diff --git a/README.md b/README.md index 1353fad..ba62ca2 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,16 @@ Endpoint = 0.0.0.0:51820 Starting with `v3.0`, you can simply do `./wgd.sh update` !! (I hope, lol) +## 🥘 Experimental Functions + +#### Progressive Web App (PWA) + +With `v3.0`, I've added a `manifest.json` into the dashboard, so user could add their dashboard as a PWA to their browser or mobile device. + + + + + ## 🔍 Screenshot ![Sign In Page](img/SignIn.png) diff --git a/img/PWA.gif b/img/PWA.gif new file mode 100644 index 0000000..bcc0f4b Binary files /dev/null and b/img/PWA.gif differ diff --git a/src/dashboard.py b/src/dashboard.py index e8aca9d..1e4dbdb 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -901,7 +901,8 @@ def update_app_ip_port(): config.set("Server", "app_port", request.form['app_port']) set_dashboard_conf(config) config.clear() - os.system('./wgd.sh restart') + subprocess.Popen('bash wgd.sh restart', shell=True) + return "" # Update WireGuard configuration file path @@ -918,7 +919,7 @@ def update_wg_conf_path(): config.clear() session['message'] = "WireGuard Configuration Path Update Successfully!" session['message_status'] = "success" - os.system('./wgd.sh restart') + subprocess.Popen('bash wgd.sh restart', shell=True) @app.route('/update_dashboard_sort', methods=['POST']) diff --git a/src/wgd.sh b/src/wgd.sh index 896a9a8..26c1ba0 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -192,7 +192,7 @@ if [ "$#" != 1 ]; printf "%s\n" "$dashes" stop_wgd printf "| WGDashboard is stopped. |\n" - sleep 2 + sleep 4 start_wgd else start_wgd