forked from shaba/openuds
Updating linux actor
This commit is contained in:
parent
9bdfb4a7eb
commit
c479fc3fbd
@ -53,15 +53,18 @@ class MyDaemon(Daemon):
|
||||
info = net.getExternalIpAndMacs()
|
||||
# We have "info" with know interfaces
|
||||
while True:
|
||||
newInfo = net.getExternalIpAndMacs()
|
||||
for k in info.keys():
|
||||
if info[k]['ip'] != newInfo[k]['ip']:
|
||||
if Rpc.notifyIpChange() is not None:
|
||||
info = newInfo
|
||||
else:
|
||||
logger.info('Could not notify IP address. Will retry later.')
|
||||
break
|
||||
time.sleep(5)
|
||||
try:
|
||||
newInfo = net.getExternalIpAndMacs()
|
||||
for k in info.keys():
|
||||
if info[k]['ip'] != newInfo[k]['ip']:
|
||||
if Rpc.notifyIpChange() is not None:
|
||||
info = newInfo
|
||||
else:
|
||||
logger.info('Could not notify IP address. Will retry later.')
|
||||
break
|
||||
time.sleep(5)
|
||||
except:
|
||||
logger.exception('Exception caught at main loop!')
|
||||
return
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ timeout=5
|
||||
|
||||
[logging]
|
||||
|
||||
debug=DEBUG
|
||||
debug=INFO
|
||||
log=/var/log/udsactor.log
|
||||
# Size in megas
|
||||
maxsize=20
|
||||
|
Loading…
Reference in New Issue
Block a user