mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-09-13 12:10:12 +02:00
build
This commit is contained in:
@@ -666,6 +666,7 @@ def backup_job(server):
|
||||
logging.info(msg)
|
||||
|
||||
send_mqtt_message(topic,msg)
|
||||
continue
|
||||
if is_port_open(s,22):
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.load_system_host_keys()
|
||||
@@ -694,8 +695,8 @@ def backup_job(server):
|
||||
except:
|
||||
pass
|
||||
|
||||
message= "finished1"
|
||||
client.publish(topic, message,qos=2,retain=True)
|
||||
return "finished1"
|
||||
|
||||
|
||||
if _RESTORE:
|
||||
restore_job()
|
||||
@@ -745,7 +746,8 @@ def handle_payload(payload):
|
||||
payload = payload.lower()
|
||||
if payload == 'm-server':
|
||||
logging.info("💡 Starting backup job")
|
||||
backup_job(payload)
|
||||
res = backup_job(payload)
|
||||
client.publish(topic, res,qos=2,retain=True)
|
||||
else:
|
||||
logging.error(f"⚠️ Unknown command: {payload}")
|
||||
|
||||
|
Reference in New Issue
Block a user