Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make monitor script a daemon #12

Closed
abh opened this issue Jun 3, 2011 · 3 comments
Closed

Make monitor script a daemon #12

abh opened this issue Jun 3, 2011 · 3 comments
Labels
Milestone

Comments

@abh
Copy link
Owner

abh commented Jun 3, 2011

Change monitor script to run continuously (under supervise, systemd, launchd etc – not daemonized, though that could be an option, too).

Whenever the last API 'poll' returned servers to check it should do so again immediately after posting results; if there were no servers to check, wait two minutes before polling again.

@loewis
Copy link
Contributor

loewis commented Jun 4, 2011

I propose https://github.com/loewis/ntppool/tree/issue12 as a patch. This creates a systemd "simple" service, which terminates on SIGTERM. I left in all the dies, which I hope should show up in the log files somehow. In some of the cases, it is probably better just to log an error message, and continue with the next loop iteration. If it dies, it should be the responsibility of the process manager to restart it (taking into consideration restart frequencies and such).

@abh
Copy link
Owner Author

abh commented Jun 4, 2011

Didn't test it, but at a glance it looks good. Thanks! I pulled it into my master branch and will try it later.

@abh
Copy link
Owner Author

abh commented Jun 6, 2011

commit 4e87625
Author: Martin v. Loewis martin@v.loewis.de
Date: Sat Jun 4 22:38:49 2011 +0800

Change monitor script to loop until SIGTERM is received,
or an error occurs.

@abh abh closed this as completed Jun 6, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants