Skip to content

Commit

Permalink
Fix listener to work with more secure image
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevs committed Jan 7, 2022
1 parent e13f895 commit 81be06a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions listener
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
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)
echo -n "Starting daemon: "$NAME
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)
Expand All @@ -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 "."
;;

Expand Down

0 comments on commit 81be06a

Please sign in to comment.