add powersave script
This commit is contained in:
parent
c4f6b8b4d0
commit
315a82eac3
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# MNT Reform Powersave Script
|
||||
#
|
||||
|
||||
if [ "on" = "$1" ]; then
|
||||
echo "Turning Powersave ON.."
|
||||
|
||||
echo "Stopping Syncthing.."
|
||||
systemctl --user stop syncthing
|
||||
|
||||
echo "Stopping Bluetooth.."
|
||||
sudo systemctl stop bluetooth
|
||||
|
||||
echo "Stopping Wifi"
|
||||
sudo systemctl stop wpa_supplicant
|
||||
|
||||
elif [ "off" = "$1" ]; then
|
||||
echo "Turning Powersave OFF.."
|
||||
|
||||
echo "Starting Syncthing.."
|
||||
systemctl --user start syncthing
|
||||
|
||||
echo "Starting Bluetooth.."
|
||||
sudo systemctl start bluetooth
|
||||
|
||||
echo "Starting Wifi.."
|
||||
sudo systemctl start wpa_supplicant
|
||||
|
||||
else
|
||||
echo "MNT Reform Powersave Script"
|
||||
echo "----------------------------"
|
||||
echo "Bluetooth: `systemctl is-active bluetooth` (`systemctl is-enabled bluetooth`)"
|
||||
echo "Wifi: `systemctl is-active wpa_supplicant` (`systemctl is-enabled wpa_supplicant`)"
|
||||
echo "PostgreSQL: `systemctl is-active postgresql` (`systemctl is-enabled postgresql`)"
|
||||
echo "Syncthing: `systemctl --user is-active syncthing` (`systemctl --user is-enabled syncthing`)"
|
||||
echo "----------------------------"
|
||||
echo "Usage:"
|
||||
echo " powersave off"
|
||||
echo " powersave on"
|
||||
fi
|
Loading…
Reference in New Issue