mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 07:46:18 +00:00
Upload manifest.json
This commit is contained in:
44
src/wgd.sh
44
src/wgd.sh
@@ -67,11 +67,17 @@ install_wgd(){
|
||||
|
||||
check_wgd_status(){
|
||||
if [[ $environment == 'production' ]]; then
|
||||
if ps aux | grep -v grep | grep $(cat ./gunicorn.pid) > /dev/null; then
|
||||
PID_FILE=./gunicorn.pid
|
||||
if test -f "$PID_FILE"; then
|
||||
if ps aux | grep -v grep | grep $(cat ./gunicorn.pid) > /dev/null; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
|
||||
else
|
||||
if ps aux | grep -v grep | grep '[p]ython3 '$app_name > /dev/null; then
|
||||
return 0
|
||||
@@ -90,15 +96,15 @@ certbot_renew_ssl () {
|
||||
}
|
||||
|
||||
gunicorn_start () {
|
||||
if [[ $SSL ]]; then
|
||||
if [ ! -d $cb_config_dir ]; then
|
||||
certbot_create_ssl
|
||||
else
|
||||
certbot_renew_ssl
|
||||
fi
|
||||
fi
|
||||
# if [[ $SSL ]]; then
|
||||
# if [ ! -d $cb_config_dir ]; then
|
||||
# certbot_create_ssl
|
||||
# else
|
||||
# certbot_renew_ssl
|
||||
# fi
|
||||
# fi
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Starting WGDashboard in the background. |\n"
|
||||
printf "| Starting WGDashboard in the background. |\n"
|
||||
if [ ! -d "log" ]; then
|
||||
mkdir "log"
|
||||
fi
|
||||
@@ -106,15 +112,15 @@ gunicorn_start () {
|
||||
if [[ $USER == root ]]; then
|
||||
export PATH=$PATH:/usr/local/bin:$HOME/.local/bin
|
||||
fi
|
||||
if [[ $SSL ]]; then
|
||||
gunicorn --certfile $cb_config_dir/live/"$SERVERURL"/cert.pem \
|
||||
--keyfile $cb_config_dir/live/"$SERVERURL"/privkey.pem \
|
||||
--access-logfile log/access_"$d".log \
|
||||
--error-logfile log/error_"$d".log 'dashboard:run_dashboard()'
|
||||
else
|
||||
gunicorn --access-logfile log/access_"$d".log \
|
||||
--error-logfile log/error_"$d".log 'dashboard:run_dashboard()'
|
||||
fi
|
||||
# if [[ $SSL ]]; then
|
||||
# gunicorn --certfile $cb_config_dir/live/"$SERVERURL"/cert.pem \
|
||||
# --keyfile $cb_config_dir/live/"$SERVERURL"/privkey.pem \
|
||||
# --access-logfile log/access_"$d".log \
|
||||
# --error-logfile log/error_"$d".log 'dashboard:run_dashboard()'
|
||||
# else
|
||||
gunicorn --access-logfile log/access_"$d".log \
|
||||
--error-logfile log/error_"$d".log 'dashboard:run_dashboard()'
|
||||
# fi
|
||||
printf "| Log files is under log/ |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
}
|
||||
@@ -128,7 +134,7 @@ start_wgd () {
|
||||
gunicorn_start
|
||||
else
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Starting WGDashboard in the background. |\n"
|
||||
printf "| Starting WGDashboard in the background. |\n"
|
||||
if [ ! -d "log" ]
|
||||
then mkdir "log"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user