WebFM/src/socket_run.sh

25 lines
713 B
Bash
Raw Normal View History

2021-02-06 04:52:46 +00:00
#!/bin/bash
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )"
echo "Working Dir: " $(pwd)
source "../venv/bin/activate"
LOG_LEVEL=error
WORKER_COUNT=1
TIMEOUT=120
# <module>:<app> IE <file>:<flask app variable>
2023-02-10 02:40:58 +00:00
gunicorn wsgi:app -p app.pid -b unix:/tmp/apps/webfm.sock \
2021-02-06 04:52:46 +00:00
-k eventlet \
-w $WORKER_COUNT \
--timeout $TIMEOUT \
--log-level $LOG_LEVEL
}
main $@;