Home

+ {% if conf == [] %} +

You don't have any WireGuard configurations yet. Please check the configuration folder or change it in "Settings". By default the folder is "/etc/wireguard".

+ {% endif %} {% for i in conf%}
diff --git a/src/templates/sidebar.html b/src/templates/sidebar.html index 976554f..71ae02a 100644 --- a/src/templates/sidebar.html +++ b/src/templates/sidebar.html @@ -9,7 +9,7 @@ {% endif %} {% if session['update'] == "true" %} {% endif %} diff --git a/src/wgd.sh b/src/wgd.sh index 4a03f34..5520044 100644 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -50,17 +50,21 @@ update_wgd() { printf "Are you sure you want to update to the %s? (Y/N): " "$new_ver" read up if [ "$up" = "Y" ]; then + printf "%s\n" "$dashes" printf "| Shutting down Wireguard Dashboard... |\n" + printf "%s\n" "$dashes" printf "| Downloading %s from GitHub... |\n" "$new_ver" + printf "%s\n" "$dashes" git pull https://github.com/donaldzou/wireguard-dashboard.git $new_ver --force > /dev/null 2>&1 - printf "| Installing all required python package |\n" - python3 -m pip install -r requirements.txt printf "| Update Successfully! |\n" - printf "| Dashboard is running... |\n" - exec "wgd.sh" "start" + printf "%s\n" "$dashes" + printf "| Now you can start the dashboard with >> sh wgd.sh start |\n" + printf "%s\n" "$dashes" exit 1 else - printf "Cancel update. \n" + printf "%s\n" "$dashes" + printf "CANCEL update. \n" + printf "%s\n" "$dashes" fi }