github bassidus/lgpowercontrol v4.3

53 minutes ago

An installation can now maintain itself. sudo lgpowercontrol update fetches the current release and keeps your settings and your TV pairing, and a new log command replaces the journalctl line the troubleshooting section used to hand out. Nothing in the suspend, wake or idle logic changed.

Updating from 4.2.1 needs a clone, because the update command is what this release adds:

git clone https://github.com/bassidus/lgpowercontrol.git
cd lgpowercontrol
sudo ./install.py --update

Your settings and the TV pairing are carried into the new version, so the configuration file no longer has to be filled in again. From 4.3 onwards, sudo lgpowercontrol update does the same without a clone.

Added

  • sudo lgpowercontrol update and sudo lgpowercontrol uninstall. An installation no longer needs the clone it came from. The update clones the current release, carries the installed settings and the pairing key into it, and runs that release's installer — so an update always installs with the new version's install.py. Settings the new version adds or no longer has are reported before anything is touched, and the trailing comments that document each value survive the merge. From a clone, ./install.py --update and --uninstall run the same code.

  • lgpowercontrol log. Shows the last 50 lines of this program's journal, log 200 for more, log -f to follow. Where it earns its place over journalctl -t lgpowercontrol is the empty case: an empty log means either that logging is off or that you are not in the group allowed to read the system journal, and the command says which rather than leaving you looking at nothing.

  • lgpowercontrol log --enable, --disable and --status. Turns logging on and off without opening the configuration file, and restarts the services that hold the setting in memory so it takes effect at once. Restarting a system service needs root, so use sudo lgpowercontrol log --enable if it says so.

  • Every command is listed in the help. Typed on its own, lgpowercontrol used to show the four TV commands and nothing else; authorize, wol, log, update and uninstall were documented only in the README.

Changed

  • lgpowercontrol log ends with whether logging is on, so you do not have to scroll back up past a screenful of lines to find out whether anything is still being written. Under -f, where there is no end, it says so first.

  • --force is gone from the installer. It skipped the conflict check, which in practice meant installing alongside LG_Buddy — something the same message warned against in its next sentence.

  • An aborted update leaves nothing behind. A declined prompt, a failed clone or a repository that is not this project all clean up after themselves; starting over is running the command again. The working directory is kept only when the installer itself fails, which is the one case where the backup of your old settings still matters.

Don't miss a new lgpowercontrol release

NewReleases is sending notifications on new releases.