mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-19 05:50:10 +01:00
Update dashboard.py
This commit is contained in:
parent
19fb90a300
commit
8dc0031475
@ -4,7 +4,6 @@ import subprocess
|
|||||||
from datetime import datetime, date, time, timedelta
|
from datetime import datetime, date, time, timedelta
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from tinydb import TinyDB, Query
|
from tinydb import TinyDB, Query
|
||||||
import threading
|
|
||||||
|
|
||||||
conf_location = "/etc/wireguard"
|
conf_location = "/etc/wireguard"
|
||||||
app = Flask("Wireguard Dashboard")
|
app = Flask("Wireguard Dashboard")
|
||||||
@ -49,7 +48,7 @@ def get_conf_peers_data(config_name):
|
|||||||
peer_data = {}
|
peer_data = {}
|
||||||
|
|
||||||
# Read Configuration File Start
|
# Read Configuration File Start
|
||||||
conf_location = "/etc/wireguard/wg0.conf"
|
conf_location = "/etc/wireguard/"+config_name+".conf"
|
||||||
f = open(conf_location, 'r')
|
f = open(conf_location, 'r')
|
||||||
file = f.read().split("\n")
|
file = f.read().split("\n")
|
||||||
conf_peer_data = {
|
conf_peer_data = {
|
||||||
|
Loading…
Reference in New Issue
Block a user