From 81be06ad7d8b96b2e0f246cec9317b24715a62dc Mon Sep 17 00:00:00 2001 From: Luke Van Seters Date: Fri, 7 Jan 2022 16:18:51 -0500 Subject: [PATCH] Fix listener to work with more secure image --- listener | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/listener b/listener index 218f401..e468db7 100755 --- a/listener +++ b/listener @@ -3,9 +3,9 @@ set -e NAME=listener -PIDFILE=/var/run/$NAME.pid -DAEMON=/root/.poetry/bin/poetry -DAEMON_OPTS="run python listener.py" +PIDFILE=/home/flashbot/$NAME.pid +DAEMON=/bin/bash +DAEMON_OPTS='-c "poetry run python listener.py"' case "$1" in start) @@ -13,11 +13,12 @@ case "$1" in start-stop-daemon \ --background \ --chdir /app \ + --chuid flashbot \ --start \ --quiet \ --pidfile $PIDFILE \ --make-pidfile \ - --startas $DAEMON -- $DAEMON_OPTS + --startas /bin/bash -- -c "poetry run python listener.py" echo "." ;; stop) @@ -36,11 +37,12 @@ case "$1" in start-stop-daemon \ --background \ --chdir /app \ + --chuid flashbot \ --start \ --quiet \ --pidfile $PIDFILE \ --make-pidfile \ - --startas $DAEMON -- $DAEMON_OPTS + --startas /bin/bash -- -c "poetry run python listener.py" echo "." ;;