1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 07:10:09 +01:00

Testing if this will fix bash exit before Gunicorn ran...

This commit is contained in:
Donald Zou 2024-08-04 15:29:07 -04:00
parent c57a5128e5
commit 0c37d93c01
3 changed files with 12 additions and 2 deletions

View File

@ -9,4 +9,4 @@ workers = 1
threads = 1
bind = f"{app_host}:{app_port}"
daemon = True
pidfile = './gunicorn.pid'
pidfile = './gunicorn.pid'

View File

@ -11,4 +11,4 @@ Restart=always
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

View File

@ -240,6 +240,16 @@ gunicorn_start () {
sudo "$venv_gunicorn" --access-logfile log/access_"$d".log \
--log-level 'debug' --capture-output \
--error-logfile log/error_"$d".log 'dashboard:app'
checkPIDExist=0
while [ $checkPIDExist -eq 0 ]
do
if [ ! -f './gunicorn.pid' ]; then
checkPIDExist=1
fi
sleep 2
done
printf "[WGDashboard] Log files is under ./log\n"
printf "%s\n" "$dashes"
}