mirror of
https://github.com/actuallymentor/battery.git
synced 2026-02-03 14:03:24 +00:00
🐛 fix issue where "stop" did not reenable charging
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
## Update management
|
||||
## variables are used by this binary as well at the update script
|
||||
## ###############
|
||||
BATTERY_CLI_VERSION="v1.2.5"
|
||||
BATTERY_CLI_VERSION="v1.2.6"
|
||||
|
||||
# Path fixes for unexpected environments
|
||||
PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
||||
@@ -640,6 +640,7 @@ if [[ "$action" == "maintain" ]]; then
|
||||
|
||||
# Kill old process silently
|
||||
if test -f "$pidfile"; then
|
||||
log "Killing old maintain process at $(cat $pidfile)"
|
||||
pid=$(cat "$pidfile" 2>/dev/null)
|
||||
kill $pid &>/dev/null
|
||||
fi
|
||||
@@ -654,6 +655,7 @@ if [[ "$action" == "maintain" ]]; then
|
||||
log "Killing running maintain daemons & enabling charging as default state"
|
||||
rm $pidfile 2>/dev/null
|
||||
$battery_binary disable_daemon
|
||||
enable_charging
|
||||
$battery_binary status
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user