scripts - How to add commands to be run after a systemd-controlled system service? - Ask Ubuntu
i made service following guide did: created systemd service unit created startup shell script configured , installed service
now, script this one. basically, @ startup did depending if laptop charging or not, , every x minutes check again , set cpus frequencies etc..
now, happens want stop reobtain full power laptop, stop it, should set again cpus frequencies etc. possible that, when systemctl stop battery-script.service
execute script or lines of code before stopping? in advance
according documentation have use execstop=
in battery-script.service. looks like:
[unit] [service] execstart=/usr/local/bin/battery.sh execstop=/usr/local/bin/battery-stop.sh [install] wantedby=default.target
Comments
Post a Comment