Clean up install/exec
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-12-25 18:21:55 +01:00
parent 3bcb8db974
commit e7578e859a
4 changed files with 46 additions and 37 deletions

18
morss-helper Executable file
View File

@@ -0,0 +1,18 @@
#! /bin/sh
if [ "$1" = "sh" ] || [ "$1" = "bash" ]; then
exec $@
elif [ -z "$1" ] || [ "$@" = "run" ]; then
gunicorn --bind 0.0.0.0:${PORT:-8000} --preload --access-logfile - morss
elif [ "$@" = "reload" ]; then
pid=$(sudo pidof 'gunicorn: master [morss]')
kill -s USR2 $pid
kill -s WINCH $pid
kill -s TERM $pid
else
morss $@
fi