2022-03-25 15:16:17 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# author: Daniel Sommer <daniel.sommer@velvettear.de>
|
|
|
|
# license: MIT
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
[[ "$EUID" != "0" ]] && printf "error: permission denied\n" && exit 1
|
|
|
|
|
2022-03-25 15:54:55 +01:00
|
|
|
. "$(dirname $(realpath $0))/config.env"
|
2022-03-25 15:16:17 +01:00
|
|
|
|
2022-03-25 15:54:55 +01:00
|
|
|
printf "${FONT_BOLD}>>> stopping pedalboard...${FONT_NORMAL}\n"
|
2022-03-25 15:16:17 +01:00
|
|
|
|
2022-03-25 15:54:55 +01:00
|
|
|
. "/usr/local/pisound/scripts/common/common.sh"
|
2022-03-25 15:16:17 +01:00
|
|
|
|
|
|
|
flash_leds 10
|
|
|
|
sleep 0.25
|
|
|
|
flash_leds 10
|
|
|
|
|
2022-03-25 15:54:55 +01:00
|
|
|
printf "> stopping pbc..."
|
2022-03-25 15:16:17 +01:00
|
|
|
systemctl stop pbc &> /dev/null
|
|
|
|
printf " done!\n"
|
|
|
|
|
|
|
|
printf "> stopping MODEP..."
|
|
|
|
patchbox module deactivate &> /dev/null
|
|
|
|
printf " done!\n"
|
|
|
|
|
|
|
|
printf "> stopping jack..."
|
|
|
|
systemctl stop jack &> /dev/null
|
|
|
|
printf " done!\n"
|
|
|
|
|
|
|
|
printf "> " && "/etc/velvettear/scripts/cpu-governor.sh" "powersave"
|
|
|
|
|
|
|
|
flash_leds 100
|
|
|
|
|
2022-03-30 15:34:42 +02:00
|
|
|
printf "${FONT_BOLD}>>> stopped pedalboard after "$SECONDS" seconds${FONT_NORMAL}\n"
|