Upload manifest.json

This commit is contained in:
Donald Cheng Hong Zou
2022-01-16 20:35:24 -05:00
parent 75f2826805
commit e2e8222005
21 changed files with 970 additions and 647 deletions

View File

@@ -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