From 0a4bbc11069bdd7a368605004e0e90eeeb5bdd06 Mon Sep 17 00:00:00 2001 From: Donald Cheng Hong Zou Date: Thu, 2 Sep 2021 22:09:06 -0400 Subject: [PATCH] Update wgd.sh --- src/wgd.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/wgd.sh b/src/wgd.sh index 97a9a3d..626dd9a 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -15,6 +15,15 @@ help () { printf "\n" } +install_wgd(){ + rm db/hi.txt + printf "| Installing latest Python dependencies |\n" + python3 -m pip install -r requirements.txt > /dev/null 2>&1 + start_wgd + +} + + check_wgd_status(){ if ps aux | grep '[p]ython3 '$app_name > /dev/null; then @@ -60,12 +69,10 @@ update_wgd() { git pull https://github.com/donaldzou/wireguard-dashboard.git $new_ver --force > /dev/null 2>&1 printf "%s\n" "$dashes" printf "| Installing latest Python dependencies |\n" - python3 -m pip install -r requirements.txt + python3 -m pip install -r requirements.txt > /dev/null 2>&1 printf "| Update Successfully! |\n" printf "%s\n" "$dashes" - printf "| Now you can start the dashboard with >> sh wgd.sh start |\n" - printf "%s\n" "$dashes" - exit 1 + start_wgd else printf "%s\n" "$dashes" printf "CANCEL update. \n"