2021-10-31 16:15:08 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2021-11-24 20:23:16 +00:00
|
|
|
if [ "$1" = "sh" ] || [ "$1" = "bash" ]; then
|
|
|
|
exec $@
|
|
|
|
|
|
|
|
elif [ -z "$1" ] || [ "$@" = "run" ]; then
|
2021-12-24 10:44:24 +00:00
|
|
|
gunicorn --bind 0.0.0.0:${PORT:-8000} --preload --access-logfile - morss
|
2021-11-24 20:23:16 +00:00
|
|
|
|
2021-12-25 17:21:55 +00:00
|
|
|
elif [ "$@" = "reload" ]; then
|
2021-12-25 22:00:22 +00:00
|
|
|
pid=$(pidof 'gunicorn: master [morss]')
|
2021-12-25 17:21:55 +00:00
|
|
|
kill -s USR2 $pid
|
|
|
|
kill -s WINCH $pid
|
|
|
|
kill -s TERM $pid
|
|
|
|
|
2021-10-31 16:15:08 +00:00
|
|
|
else
|
2021-11-21 20:57:06 +00:00
|
|
|
morss $@
|
2021-11-24 20:23:16 +00:00
|
|
|
|
2021-10-31 16:15:08 +00:00
|
|
|
fi
|