Update dashboard.py

This commit is contained in:
Donald Zou 2025-01-01 10:36:44 +08:00
parent 2ed49abb1b
commit a85a8668a7

View File

@ -467,8 +467,10 @@ class WireguardConfiguration:
self.Name = name
self.__configPath = os.path.join(DashboardConfig.GetConfig("Server", "wg_conf_path")[1], f'{self.Name}.conf')
if not os.path.exists(os.path.join(DashboardConfig.GetConfig("Server", "wg_conf_path")[1], 'WGDashboard_Backup')):
os.mkdir(os.path.join(DashboardConfig.GetConfig("Server", "wg_conf_path")[1], 'WGDashboard_Backup'))
backupPath = os.path.join(DashboardConfig.GetConfig("Server", "wg_conf_path")[1], 'WGDashboard_Backup')
if not os.path.exists(backupPath):
os.mkdir(backupPath)
if name is not None:
if data is not None and "Backup" in data.keys():