mirror of
https://gitlab.sectorq.eu/jaydee/python.git
synced 2025-12-14 10:44:52 +01:00
bitwarden
This commit is contained in:
@@ -94,15 +94,15 @@ if not host in backups:
|
|||||||
print("Test connection")
|
print("Test connection")
|
||||||
|
|
||||||
hm = socket.gethostbyaddr("omv.home.lan")
|
hm = socket.gethostbyaddr("omv.home.lan")
|
||||||
HOST_UP = os.system(f"ping -c 1 -w 2 omv.home.lan") == 0
|
|
||||||
print(HOST_UP)
|
|
||||||
if not HOST_UP:
|
|
||||||
print("Backup host down")
|
|
||||||
send_magic_packet('88:c9:b3:b5:23:d8')
|
|
||||||
|
|
||||||
hostdown = True
|
hostdown = True
|
||||||
while hostdown:
|
while hostdown:
|
||||||
HOST_UP = os.system(f"ping -c 1 -w 2 omv.home.lan") == 0
|
HOST_UP = os.system(f"ping -c 1 -w 2 omv.home.lan") == 0
|
||||||
|
cmnd = "ping -c 1 -w 2 omv.home.lan"
|
||||||
|
status, output = subprocess.getstatusoutput(cmnd)
|
||||||
|
print(status)
|
||||||
|
print(output)
|
||||||
|
|
||||||
if not HOST_UP:
|
if not HOST_UP:
|
||||||
send_magic_packet('88:c9:b3:b5:23:d8')
|
send_magic_packet('88:c9:b3:b5:23:d8')
|
||||||
print("Backup host down, waiting")
|
print("Backup host down, waiting")
|
||||||
|
|||||||
Reference in New Issue
Block a user