Browse Source

v7.0.0.0

Changelog: https://roxy-wi.org/changelog#7.0.0
pull/364/head
Aidaho 1 year ago
parent
commit
6a671d96e2
  1. 3
      app/modules/config/add.py
  2. 3
      app/modules/config/config.py

3
app/modules/config/add.py

@ -216,7 +216,10 @@ def save_bwlist(list_name: str, list_con: str, color: str, group: str, server_ip
for serv in servers:
server_mod.ssh_command(serv, [f"sudo mkdir {path}"])
server_mod.ssh_command(serv, [f"sudo chown $(whoami) {path}"])
try:
error = config_mod.upload(serv, f'{path}/{list_name}', list_path)
except Exception as e:
error = f'{serv}: {e}'
if error:
output += f'error: Upload fail: {error} , '

3
app/modules/config/config.py

@ -53,8 +53,7 @@ def upload(server_ip, path, file):
except Exception as e:
error = str(e.args)
roxywi_common.logging('Roxy-WI server', f'error: Cannot upload {file} to {path} to server: {server_ip}: {error}', roxywi=1)
print(f'error: Cannot upload {file} to {path} to server: {server_ip}: {error}')
raise Exception(error)
raise Exception(f'error: Cannot upload {file} to {path} to server: {server_ip}: {error}')
def upload_and_restart(server_ip: str, cfg: str, just_save: str, service: str, **kwargs):

Loading…
Cancel
Save