summaryrefslogtreecommitdiff
path: root/package/gkrellm/files/gkrellmd.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/gkrellm/files/gkrellmd.init')
-rw-r--r--package/gkrellm/files/gkrellmd.init27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/gkrellm/files/gkrellmd.init b/package/gkrellm/files/gkrellmd.init
new file mode 100644
index 0000000..54c4266
--- /dev/null
+++ b/package/gkrellm/files/gkrellmd.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG gkrellmd
+#INIT 80
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${gkrellmd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/bin/gkrellmd -d
+ ;;
+stop)
+ kill $(pgrep -f /usr/bin/gkrellmd)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?