Commit 18109727 authored by Leo Iannacone's avatar Leo Iannacone

if json log file does not exist, watch for is creation - closes #4

parent 9b89af82
...@@ -73,6 +73,13 @@ __watch_pidfile = (socket) -> ...@@ -73,6 +73,13 @@ __watch_pidfile = (socket) ->
return return
Broadcaster = (sockets, status) -> Broadcaster = (sockets, status) ->
if not fs.existsSync(config.debomatic.jsonfile)
# watch until json log file is created
fs.watchFile config.debomatic.jsonfile, (curr, prev) ->
if curr.ino isnt 0
fs.unwatchFile(config.debomatic.jsonfile)
__watch_status(sockets, status)
else
__watch_status(sockets, status) __watch_status(sockets, status)
__watch_distributions(sockets) __watch_distributions(sockets)
__watch_pidfile(sockets) __watch_pidfile(sockets)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment