mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-07-01 23:58:33 +02:00
lala
This commit is contained in:
@ -32,12 +32,15 @@ def is_port_open(host, port):
|
|||||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
# doesn't even have to be reachable
|
# doesn't even have to be reachable
|
||||||
conn = False
|
conn = False
|
||||||
while not conn:
|
while not conn:
|
||||||
s.connect(('192.168.77.1', 1))
|
try:
|
||||||
IP = s.getsockname()[0]
|
s.connect(('192.168.77.1', 1))
|
||||||
print(IP)
|
IP = s.getsockname()[0]
|
||||||
print(output)
|
print(IP)
|
||||||
time.sleep(5)
|
print(output)
|
||||||
|
conn = True
|
||||||
|
except:
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
broker = 'mqtt.home.lan'
|
broker = 'mqtt.home.lan'
|
||||||
port = 1883
|
port = 1883
|
||||||
|
Reference in New Issue
Block a user