add ip update
This commit is contained in:
parent
e7f4bb6a35
commit
a9ee8e1f80
@ -326,6 +326,15 @@ if __name__ == "__main__":
|
||||
|
||||
for attempt in range(3):
|
||||
try:
|
||||
vm_ip = os.popen("ip -4 addr show eth0 | grep -oP '(?<=inet )[^/]+'").read()
|
||||
vm_ip = vm_ip.strip()
|
||||
if vm_ip == "":
|
||||
logger.error("Failed to get VM IP address")
|
||||
else:
|
||||
logger.info(f"VM IP address: {vm_ip}")
|
||||
grist_callback({"IP": f"{vm_ip}"})
|
||||
|
||||
|
||||
# Pass initial state to check_logs
|
||||
result = check_logs(logger, initial_sync_count, previous_status_type)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user