Docker + crontab backwards compatibility

This commit is contained in:
timothymiller
2020-08-05 03:40:45 -04:00
parent df6b8a381a
commit de9cf97708
3 changed files with 16 additions and 4 deletions

View File

@@ -125,6 +125,8 @@ def updateIPs():
print("Checking " + ip["type"] + " records")
commitRecord(ip)
if(len(sys.argv) > 1):
if(sys.argv[1] == "--repeat"):
import threading
threading.Thread(target=lambda: every(60*15, updateIPs)).start()
updateIPs()
import threading
threading.Thread(target=lambda: every(60*15, updateIPs)).start()