From 295daab9ab9e63baa314c51f6efaa8ce7a425601 Mon Sep 17 00:00:00 2001 From: velvettear Date: Fri, 25 Mar 2022 15:54:55 +0100 Subject: [PATCH] fixed '.env' file sourcing --- start-pedalboard.sh | 6 +++--- stop-pedalboard.sh | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/start-pedalboard.sh b/start-pedalboard.sh index 90d3b29..089f6f3 100755 --- a/start-pedalboard.sh +++ b/start-pedalboard.sh @@ -7,11 +7,11 @@ set -e [[ "$EUID" != "0" ]] && printf "error: permission denied\n" && exit 1 -source "./config.env" +. "$(dirname $(realpath $0))/config.env" printf "${FONT_BOLD}>>> starting pedalboard...${FONT_NORMAL}\n" -source "/usr/local/pisound/scripts/common/common.sh" +. "/usr/local/pisound/scripts/common/common.sh" flash_leds 10 sleep 0.25 @@ -47,4 +47,4 @@ printf " done!\n" flash_leds 100 -printf "${FONT_BOLD}>>> started pedalboard after "$SECONDS" seconds${FONT_NORMAL}\n" \ No newline at end of file +printf "${FONT_BOLD}>>> started pedalboard after "$SECONDS" seconds${FONT_NORMAL}\n" diff --git a/stop-pedalboard.sh b/stop-pedalboard.sh index ec2dc1a..81a0d52 100755 --- a/stop-pedalboard.sh +++ b/stop-pedalboard.sh @@ -7,17 +7,17 @@ set -e [[ "$EUID" != "0" ]] && printf "error: permission denied\n" && exit 1 -source "./config.env" +. "$(dirname $(realpath $0))/config.env" -printf "${FONT_BOLD}> stopping pedalboard...${FONT_NORMAL}\n" +printf "${FONT_BOLD}>>> stopping pedalboard...${FONT_NORMAL}\n" -source "/usr/local/pisound/scripts/common/common.sh" +. "/usr/local/pisound/scripts/common/common.sh" flash_leds 10 sleep 0.25 flash_leds 10 -printf ">>> stopping pbc..." +printf "> stopping pbc..." systemctl stop pbc &> /dev/null printf " done!\n" @@ -33,4 +33,4 @@ printf "> " && "/etc/velvettear/scripts/cpu-governor.sh" "powersave" flash_leds 100 -printf "${FONT_BOLD}>>> stopped pedalboard after "$SECONDS" seconds${FONT_NORMAL}\n" \ No newline at end of file +printf "${FONT_BOLD}>>> stopped pedalboard after "$SECONDS" seconds${FONT_NORMAL}\n"