Fix more bugs
This commit is contained in:
parent
3caf0d7df6
commit
0b3c6bfe92
7
cbattery
7
cbattery
|
@ -85,7 +85,7 @@ install_launch_daemon() {
|
||||||
fi
|
fi
|
||||||
sudo cp "$share_plist" "$launch_daemon"
|
sudo cp "$share_plist" "$launch_daemon"
|
||||||
sudo chown root:wheel "$launch_daemon"
|
sudo chown root:wheel "$launch_daemon"
|
||||||
sudo launchctl load "$launch_daemon"
|
sudo launchctl load -w "$launch_daemon"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_cached_status() {
|
get_cached_status() {
|
||||||
|
@ -113,6 +113,11 @@ runScript() {
|
||||||
"revert")
|
"revert")
|
||||||
enable_charging
|
enable_charging
|
||||||
disable_discharging
|
disable_discharging
|
||||||
|
launch_daemon=/Library/LaunchDaemons/cbattery.plist
|
||||||
|
if [[ -f "$launch_daemon" ]]; then
|
||||||
|
sudo launchctl unload -w "$launch_daemon"
|
||||||
|
sudo rm "$launch_daemon"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
"charging")
|
"charging")
|
||||||
echo "Setting $action to $setting"
|
echo "Setting $action to $setting"
|
||||||
|
|
Loading…
Reference in New Issue