summaryrefslogtreecommitdiff
path: root/package/totd/files/totd.init
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-02-24 13:38:40 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-02-24 13:38:40 +0100
commit83e587cc2ca21ff7e0eaa5e53d8d3edaca7a1d6d (patch)
tree94c7b37e550af153c3d86bc854c67d2b44458836 /package/totd/files/totd.init
parent0ed8c5474b6d5033fef536500cfc4d64c6debc66 (diff)
parent67ec049f25e299957fada55ea8738e0967547c6f (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/totd/files/totd.init')
-rwxr-xr-xpackage/totd/files/totd.init26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/totd/files/totd.init b/package/totd/files/totd.init
new file mode 100755
index 000000000..665e36171
--- /dev/null
+++ b/package/totd/files/totd.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#PKG totd
+#INIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${totd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ totd $totd_flags -c /etc/totd.conf
+ ;;
+stop)
+ pkill totd
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?