From ffae70dabb5c22b4cfa808f14d4f68e2b25466ee Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 9 Dec 2023 16:03:14 +1100 Subject: [PATCH] Updated start.sh, to allow for different PID location --- start.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 54bc032..404bb66 100755 --- a/start.sh +++ b/start.sh @@ -1,11 +1,12 @@ #!/bin/bash +export PIDDIR=${PIDDIR:-/var/run} export SBBSCTRL=/opt/sbbs/ctrl -PIDFILE=/var/run/sbbs.pid +PIDFILE=${PIDDIR}/sbbs.pid # Proxy signals function kill_app(){ - kill $(cat ${SBBS_PID}) + kill $(cat ${PIDFILE}) exit 0 # exit okay } trap "kill_app" SIGINT SIGTERM @@ -21,7 +22,7 @@ if [ -n ${SBBS_PID} ]; then NAME=$(cat /proc/${SBBS_PID}/cmdline |awk 'BEGIN { FS = "\0" } ;{print $1}') #echo "* SBBS NAME [${NAME}]" - if [ "${NAME}" != "sbbs" ]; then + if [ "${NAME}" != "sbbs" -a "${NAME}" != "/mnt/lima-rosetta/rosetta" ]; then echo "! Name not matching? [${NAME}]" break; fi