Files
qgreper/restart.sh
2022-10-09 18:17:15 +02:00

28 lines
309 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [ -z "$SERVER" ]
then
echo "SERVER is not set" >&2
exit 1
fi
case "$SERVER" in
dev)
touch main.py
;;
gunicorn)
if [ -z "$PID" ]
then
echo "PID is not set" >&2
exit 1
fi
kill -hup $(cat "$PID")
;;
*)
echo "Unsupported $SERVER" >&2
exit 1
;;
esac