Merge pull request #221 from flashbots/fix-listener-small-image

Fix listener to work with more secure image
This commit is contained in:
Luke Van Seters 2022-01-08 07:04:44 -05:00 committed by GitHub
commit 4a4992a0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 "."
;;