diff options
-rw-r--r-- | debian/sitesummary-client.cron.d | 2 | ||||
-rw-r--r-- | debian/sitesummary-client.init | 32 |
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/sitesummary-client.cron.d b/debian/sitesummary-client.cron.d new file mode 100644 index 0000000..3760cf3 --- /dev/null +++ b/debian/sitesummary-client.cron.d @@ -0,0 +1,2 @@ +# Run once a day to report the wherabouts of the machine +20 5 * * * root [ -x /usr/sbin/sitesummary-client ] && /usr/sbin/sitesummary-client diff --git a/debian/sitesummary-client.init b/debian/sitesummary-client.init new file mode 100644 index 0000000..282990b --- /dev/null +++ b/debian/sitesummary-client.init @@ -0,0 +1,32 @@ +#!/bin/sh +### BEGIN INIT INFO +# provides: sitesummary-client +# required-start: $network $remote_fs +# required-stop: +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: Report status to sitesummary server after boot +# Description: Report to sitesummary server 5 minutes +# after the machine boots normally (not in single user) +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +CLIENT=/usr/sbin/sitesummary-client + +[ -f /etc/default/sitesummary-client ] && . /etc/default/sitesummary-client + +test -x $CLIENT || exit 0 + +case "$1" in + start) + ( sleep 300 ; $CLIENT ) & + ;; + stop|reload|force-reload|restart) + ;; + *) + echo "Usage: /etc/init.d/atd {start|stop|restart|force-reload|reload}" + exit 1 + ;; +esac + +exit 0 |