Closed FrancYescO closed 5 years ago
/etc/init.d/ledfw stop/start/restart is not enought to get leds working again in the normal way: all trigger get broken after a stop, and you just used the hostapd restart to fix the wifi, but what about internet voip etc?
The LED script is working to the point I need it to (eg mine's a bridge modem so power + Ethernet are the only two LEDs required). I added the wifi restart on a whim at one point as I had the modem set up differently. PRs are welcome if you want to implement similar checks/restarts for Internet, VoIP etc.
probably directly accessing /sys/class/leds/ is a bad practice (the best way is to simulate ubus commands to turn led off, but yeah a little boring) but if you want to keep "as is" please just warn users that using your led control scripts will break normal tch behaviours (about the ecoled function)
Improvements via PRs are definitely welcome if there's a better or more reliable way of achieving the same behaviour that I have now. Otherwise, I try and make it clear in the README that this code is very much hacking up your modem and that it may not do what you expect or need.
here https://github.com/Ansuel/tch-nginx-gui/issues/264#issuecomment-444184467 i've posted some ubus commands that can allow to restart in a better way the led status (after a ledfw restart), oviusly check on services must be done before issuing these commands (otherwise you will fakely send a "service online" notification to all the gateway)
still haven't realised this part of code.
Okay, right -- if you want to figure out what checks on services are needed and put together a PR to modify my original script, please do. None of those commands are needed in my case but would be useful for others. At least in the case of wifi, it's a better plan than restarting hostapd
unnecessarily.
Where does transformer-cli
come from? That's not an executable that's on my modem's PATH -- at least not by default.
Sure, is realized ad hoc by us to get all things working with our Customized webGUI
From: David Beitey notifications@github.com Sent: Saturday, December 15, 2018 6:14:17 AM To: davidjb/technicolor-tg799vac-hacks Cc: Francesco M; Author Subject: Re: [davidjb/technicolor-tg799vac-hacks] LED control will break standard behaviours of tch (#6)
Where does transformer-cli come from? That's not an executable that's on my modem's PATH -- at least not by default.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/davidjb/technicolor-tg799vac-hacks/issues/6#issuecomment-447538412, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEXNgWzxMYIG-0b3LmO7IgNqv4aa64O4ks5u5IUpgaJpZM4ZJjjp.
Right, thought that might be how it was -- and I see that the transformer-cli
is basically a wrapper around ubus
calls.
In that case, the ubus commands available for these extra services are unavailable to me as the services are intentionally disabled on my bridge modem. So, it's up to someone else who actually needs these checks to implement them and test them on their own system. PRs are most definitely welcome if someone wants to implement direct ubus
calls with parsing of the output using standard shell utilities.
sorry didn't got you where asking about transformer-cli
, this is an utility by technicolor, a wrapper for uci and rpc, but yes this s missing on some gateway (we force-restored it)
you are right, using shell utilities is a better way but pretty trivial, actually we adopted the faster way.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
please note https://github.com/Ansuel/tch-nginx-gui/issues/264#issuecomment-445445286 and all explanation done before
to resume:
hostapd restart
to fix the wifi, but what about internet voip etc?/sys/class/leds/
is a bad practice (the best way is to simulate ubus commands to turn led off, but yeah a little boring) but if you want to keep "as is" please just warn users that using your led control scripts will break normal tch behaviours (about the ecoled function)