nixos-config/nixos/assets/music-making.sh
2023-04-26 09:23:56 +02:00

48 lines
903 B
Bash

#!/usr/bin/env 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 -r
echo
start