aboutsummaryrefslogtreecommitdiff
path: root/rc.proto
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2002-03-04 07:28:25 +0000
committerJudd Vinet <judd@archlinux.org>2002-03-04 07:28:25 +0000
commit98c76a453222169f12b0e95f8a7ed0175e182598 (patch)
tree59132a1d0bafb1a284b804b29bda1dbc049fd79d /rc.proto
downloadinitscripts-98c76a453222169f12b0e95f8a7ed0175e182598.tar.xz
Initial revision
Diffstat (limited to 'rc.proto')
-rw-r--r--rc.proto33
1 files changed, 33 insertions, 0 deletions
diff --git a/rc.proto b/rc.proto
new file mode 100644
index 0000000..3bf45e3
--- /dev/null
+++ b/rc.proto
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Daemon"
+ /usr/sbin/daemon
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon daemon
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Daemon"
+ killall -q daemon
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon daemon
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac