aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2006-08-24 07:50:59 +0000
committerPetter Reinholdtsen <pere@hungry.com>2006-08-24 07:50:59 +0000
commit81e37e97121b47fb83ca5cfd2780e4d2257154c9 (patch)
tree43eaeea557f5e1e1dfef6e834e12051b4555355c
parent6de44e8c744f0294e3514202f6110a62ca856c96 (diff)
downloadsitesummary-81e37e97121b47fb83ca5cfd2780e4d2257154c9.tar.gz
sitesummary-81e37e97121b47fb83ca5cfd2780e4d2257154c9.tar.bz2
sitesummary-81e37e97121b47fb83ca5cfd2780e4d2257154c9.tar.xz
Run client daily and 5 minutes after boot.
-rw-r--r--debian/sitesummary-client.cron.d2
-rw-r--r--debian/sitesummary-client.init32
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