diff --git a/Bundler/openntpd.xml b/Bundler/openntpd.xml index 789d098..075b5da 100644 --- a/Bundler/openntpd.xml +++ b/Bundler/openntpd.xml @@ -1,4 +1,5 @@ + diff --git a/Cfg/etc/init.d/openntpd/info.xml b/Cfg/etc/init.d/openntpd/info.xml new file mode 100644 index 0000000..a0b21f3 --- /dev/null +++ b/Cfg/etc/init.d/openntpd/info.xml @@ -0,0 +1,3 @@ + + + diff --git a/Cfg/etc/init.d/openntpd/openntpd b/Cfg/etc/init.d/openntpd/openntpd new file mode 100755 index 0000000..bbd586a --- /dev/null +++ b/Cfg/etc/init.d/openntpd/openntpd @@ -0,0 +1,74 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: openntpd +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start openntpd at boot time +# Description: NTP, the Network Time Protocol, is used to keep the +# computer clocks synchronized. +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/ntpd +NAME=ntpd +DESC=openntpd +PIDFILE=/var/run/openntpd/ntpd.pid + +test -e /usr/sbin/openntpd || exit 0 + +# Include openntpd defaults if available +if [ -f /etc/default/openntpd ] +then + . /etc/default/openntpd +fi + +set -e + +check_privsep_dir() +{ + # check that the privsep dir exists + if [ ! -d /var/run/openntpd ] + then + mkdir /var/run/openntpd + chmod 0755 /var/run/openntpd + fi +} + +case "$1" in + start) + check_privsep_dir + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ps aux | egrep "^root .* /usr/sbin/ntpd$" | awk '{print $2}' > $PIDFILE + ;; + + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --oknodo --quiet \ + --pidfile /var/run/openntpd/ntpd.pid --exec $DAEMON + echo "$NAME." + ;; + + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --oknodo --quiet \ + --pidfile /var/run/openntpd/ntpd.pid --exec $DAEMON + sleep 1 + check_privsep_dir + start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ps aux | egrep "^root .* /usr/sbin/ntpd$" | awk '{print $2}' > $PIDFILE + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/Python/etc/monit/services b/Python/etc/monit/services index 9989fc3..f08b752 100644 --- a/Python/etc/monit/services +++ b/Python/etc/monit/services @@ -108,6 +108,10 @@ service("postfix", pidp="/var/spool/postfix/pid/master.pid", extra=["if failed port 25 protocol smtp timeout 30 seconds then restart"]) +service("crans-common", + name="openntpd", + pidf="openntpd/ntpd") + service("openvpn-ovh", pidf="openvpn.ovh", init="openvpn")