1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-18 21:40:12 +01:00

Update dashboard.py

This commit is contained in:
Donald Cheng Hong Zou 2021-04-03 14:30:02 -04:00
parent 19fb90a300
commit 8dc0031475

View File

@ -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 = {