| Date: Tue, 14 Nov 2017 17:58:34 +0000
Slackware rc file patch
Hello
A patch that adds a slackware rc file for geomyidae.
Bye
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
rc.d/rc.geomyidae | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)
--- |
| t@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# rc file for Slackware Linux.
+# This lives in /ect/rc.d/
+
+PID=$(pidof -o %PPID /usr/bin/geomyidae)
+
+case "$1" in
+ start)
+ echo "Starting geomyidae"
+ [ -z "$PID" ] && /usr/bin/geomyidae $GEOMYIDAE_ARGS 2>&1
+ if [ $? -gt 0 ]; then
+ echo "Startup failed"
+ fi
+ ;;
+ stop)
+ echo "Stopping geomyidae"
+ [ -n "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ echo "Stopping failed"
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+ |