stipid bug((

This commit is contained in:
vvzvlad 2023-04-17 22:38:31 +07:00
parent 70c562b4e3
commit f8c74022a1

View File

@ -244,7 +244,7 @@ def check_vestasync_installed(c):
result = c.run(f"test -d {vestasync_path}", warn=True) result = c.run(f"test -d {vestasync_path}", warn=True)
return result.ok return result.ok
def device_install(c): def device_update(c):
print("Found vestasync! Update...") print("Found vestasync! Update...")
copy_wb_rule(c) copy_wb_rule(c)
create_automac_systemd(c) create_automac_systemd(c)
@ -253,7 +253,7 @@ def device_install(c):
run_user_cmd(c, args.user_cmd_file) run_user_cmd(c, args.user_cmd_file)
print("Update vestasync complete\n") print("Update vestasync complete\n")
def device_update(c): def device_install(c):
print("Not found vestasync! Install...") print("Not found vestasync! Install...")
prepare_packages_wb(c) prepare_packages_wb(c)
configure_git(c) configure_git(c)
@ -278,9 +278,9 @@ def device_install_or_update():
print(f"\nConnect to {device_ip} as {device_user}..") print(f"\nConnect to {device_ip} as {device_user}..")
try: try:
if not check_vestasync_installed(c): if not check_vestasync_installed(c):
device_update(c)
else:
device_install(c) device_install(c)
else:
device_update(c)
except socket.timeout: except socket.timeout:
print(f"Failed to connect to the host {device_ip}") print(f"Failed to connect to the host {device_ip}")