mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-08-28 07:51:13 +00:00
Changed dashboard naming to WGDashboard
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
< Wireguard Dashbaord > - by Donald Zou [https://github.com/donaldzou]
|
||||
< WGDashboard > - by Donald Zou [https://github.com/donaldzou]
|
||||
Under Apache-2.0 License
|
||||
"""
|
||||
|
||||
@@ -28,7 +28,7 @@ dashboard_conf = 'wg-dashboard.ini'
|
||||
# Upgrade Required
|
||||
update = ""
|
||||
# Flask App Configuration
|
||||
app = Flask("Wireguard Dashboard")
|
||||
app = Flask("WGDashboard")
|
||||
app.secret_key = secrets.token_urlsafe(16)
|
||||
app.config['TEMPLATES_AUTO_RELOAD'] = True
|
||||
# Enable QR Code Generator
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Wireguard Dashboard | {{ title }}</title>
|
||||
<title>WGDashboard | {{ title }}</title>
|
||||
<link rel="icon" href="{{ url_for('static',filename='img/logo.png') }}"/>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap.min.css') }}">
|
||||
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='css/dashboard.css') }}">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
||||
<a class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="/">Wireguard Dashboard</a>
|
||||
<a class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="/">WGDashboard</a>
|
||||
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-toggle="collapse"
|
||||
data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Wireguard Dashboard | Login</title>
|
||||
<title>WGDashboard | Login</title>
|
||||
<link rel="icon" href="{{ url_for('static',filename='logo.png') }}"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='css/dashboard.css') }}">
|
||||
|
34
src/wgd.sh
34
src/wgd.sh
@@ -1,21 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
app_name="dashboard.py"
|
||||
app_official_name="Wireguard Dashboard"
|
||||
app_official_name="WGDashboard"
|
||||
dashes='------------------------------------------------------------'
|
||||
equals='============================================================'
|
||||
help () {
|
||||
printf "=================================================================================\n"
|
||||
printf "+ <Wireguard Dashboard> by Donald Zou - https://github.com/donaldzou +\n"
|
||||
printf "+ <WGDashboard> by Donald Zou - https://github.com/donaldzou +\n"
|
||||
printf "=================================================================================\n"
|
||||
printf "| Usage: ./wgd.sh <option> |\n"
|
||||
printf "| |\n"
|
||||
printf "| Available options: |\n"
|
||||
printf "| start: To start Wireguard Dashboard |\n"
|
||||
printf "| stop: To stop Wireguard Dashboard. |\n"
|
||||
printf "| debug: To start Wireguard Dashboard in debug mode (i.e run in foreground). |\n"
|
||||
printf "| update: To update Wireguard Dashboard to the newest version from GitHub. |\n"
|
||||
printf "| install: To install Wireguard Dashboard. |\n"
|
||||
printf "| start: To start WGDashboard. |\n"
|
||||
printf "| stop: To stop WGDashboard. |\n"
|
||||
printf "| debug: To start WGDashboard in debug mode (i.e run in foreground). |\n"
|
||||
printf "| update: To update WGDashboard to the newest version from GitHub. |\n"
|
||||
printf "| install: To install WGDashboard. |\n"
|
||||
printf "| Thank you for using! Your support is my motivation ;) |\n"
|
||||
printf "=================================================================================\n"
|
||||
}
|
||||
@@ -24,7 +24,7 @@ install_wgd(){
|
||||
# Check Python3 version
|
||||
version_pass=$(python3 -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 7) else print("0");')
|
||||
if [ $version_pass == "0" ]
|
||||
then printf "| Wireguard Dashboard required Python3.7+ |\n"
|
||||
then printf "| WGDashboard required Python3.7+ |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
exit 1
|
||||
fi
|
||||
@@ -34,7 +34,7 @@ install_wgd(){
|
||||
fi
|
||||
printf "| Installing latest Python dependencies |\n"
|
||||
python3 -m pip install -r requirements.txt > /dev/null 2>&1
|
||||
printf "| Wireguard Dashboard installed successfully! |\n"
|
||||
printf "| WGDashboard installed successfully! |\n"
|
||||
printf "| Starting Dashboard |\n"
|
||||
start_wgd
|
||||
}
|
||||
@@ -51,7 +51,7 @@ check_wgd_status(){
|
||||
|
||||
start_wgd () {
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Starting Wireguard Dashboard in the background. |\n"
|
||||
printf "| Starting WGDashboard in the background. |\n"
|
||||
if [ ! -d "log" ]
|
||||
then mkdir "log"
|
||||
fi
|
||||
@@ -67,7 +67,7 @@ stop_wgd() {
|
||||
|
||||
start_wgd_debug() {
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Starting Wireguard Dashboard in the foreground. |\n"
|
||||
printf "| Starting WGDashboard in the foreground. |\n"
|
||||
python3 "$app_name"
|
||||
printf "%s\n" "$dashes"
|
||||
}
|
||||
@@ -78,7 +78,7 @@ update_wgd() {
|
||||
printf "| Are you sure you want to update to the %s? (Y/N): " "$new_ver"
|
||||
read up
|
||||
if [ "$up" = "Y" ]; then
|
||||
printf "| Shutting down Wireguard Dashboard... |\n"
|
||||
printf "| Shutting down WGDashboard... |\n"
|
||||
kill "$(ps aux | grep "[p]ython3 $app_name" | awk '{print $2}')"
|
||||
printf "| Downloading %s from GitHub... |\n" "$new_ver"
|
||||
git stash > /dev/null 2>&1
|
||||
@@ -102,7 +102,7 @@ if [ "$#" != 1 ];
|
||||
if [ "$1" = "start" ]; then
|
||||
if check_wgd_status; then
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Wireguard Dashboard is already running. |\n"
|
||||
printf "| WGDashboard is already running. |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
else
|
||||
start_wgd
|
||||
@@ -111,11 +111,11 @@ if [ "$#" != 1 ];
|
||||
if check_wgd_status; then
|
||||
printf "%s\n" "$dashes"
|
||||
stop_wgd
|
||||
printf "| Wireguard Dashboard is stopped. |\n"
|
||||
printf "| WGDashboard is stopped. |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
else
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Wireguard Dashboard is not running. |\n"
|
||||
printf "| WGDashboard is not running. |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
fi
|
||||
elif [ "$1" = "update" ]; then
|
||||
@@ -126,7 +126,7 @@ if [ "$#" != 1 ];
|
||||
if check_wgd_status; then
|
||||
printf "%s\n" "$dashes"
|
||||
stop_wgd
|
||||
printf "| Wireguard Dashboard is stopped. |\n"
|
||||
printf "| WGDashboard is stopped. |\n"
|
||||
sleep 2
|
||||
start_wgd
|
||||
else
|
||||
@@ -134,7 +134,7 @@ if [ "$#" != 1 ];
|
||||
fi
|
||||
elif [ "$1" = "debug" ]; then
|
||||
if check_wgd_status; then
|
||||
printf "| Wireguard Dashboard is already running. |\n"
|
||||
printf "| WGDashboard is already running. |\n"
|
||||
else
|
||||
start_wgd_debug
|
||||
fi
|
||||
|
Reference in New Issue
Block a user