nixos-config/nixos/assets/music-making.sh
2021-09-25 20:28:25 +02:00

50 lines
919 B
Bash

function stop_program(){
echo "stop $1"
sudo systemctl stop $1
}
function start_program(){
echo "start $1"
sudo systemctl stop $1
}
function start(){
echo "starting programs again"
echo "-----------------------"
echo
start_program backup.on-porani.insecure.timer
start_program backup.on-workhorse.insecure.timer
start_program backup.on-workout.insecure.timer
start_program syncthing.service
start_program tlp.service
start_program tor.service
}
function stop(){
echo "stopping programs"
echo "-----------------"
echo
stop_program backup.on-porani.insecure.timer
stop_program backup.on-workhorse.insecure.timer
stop_program backup.on-workout.insecure.timer
stop_program syncthing.service
stop_program tlp.service
stop_program tor.service
}
# ----
# main
# ----
stop
echo
echo -n "wait to start again -> "
read
echo
start