mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-07-03 00:23:06 +02:00
initial
This commit is contained in:
@ -31,7 +31,6 @@ s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|||||||
s.connect(('192.168.77.1', 1))
|
s.connect(('192.168.77.1', 1))
|
||||||
IP = s.getsockname()[0]
|
IP = s.getsockname()[0]
|
||||||
print(IP)
|
print(IP)
|
||||||
input(" ??")
|
|
||||||
print(output)
|
print(output)
|
||||||
if int(output) > 0:
|
if int(output) > 0:
|
||||||
print("Running already!")
|
print("Running already!")
|
||||||
@ -194,10 +193,6 @@ if _RESTORE:
|
|||||||
client.publish(topic, json.dumps(msg))
|
client.publish(topic, json.dumps(msg))
|
||||||
client.disconnect()
|
client.disconnect()
|
||||||
|
|
||||||
cmnd = "ssh root@omv.home.lan 'mkdir -p " + NEW_BACKUP_DIR + "'"
|
|
||||||
|
|
||||||
if _EXECUTE:
|
|
||||||
status, output = subprocess.getstatusoutput(cmnd)
|
|
||||||
print("Create backup dir")
|
print("Create backup dir")
|
||||||
print(cmnd)
|
print(cmnd)
|
||||||
|
|
||||||
@ -212,8 +207,6 @@ if _RESTORE:
|
|||||||
print(cmnd)
|
print(cmnd)
|
||||||
print("Sync files")
|
print("Sync files")
|
||||||
if _TEST:
|
if _TEST:
|
||||||
|
|
||||||
|
|
||||||
ans = input("continue?") or "n"
|
ans = input("continue?") or "n"
|
||||||
if ans == "y" and _EXECUTE:
|
if ans == "y" and _EXECUTE:
|
||||||
status, output = subprocess.getstatusoutput(cmnd)
|
status, output = subprocess.getstatusoutput(cmnd)
|
||||||
|
Reference in New Issue
Block a user