]> matita.cs.unibo.it Git - helm.git/commitdiff
A brand new daemon: rdfly.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 20 Feb 2004 14:55:53 +0000 (14:55 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 20 Feb 2004 14:55:53 +0000 (14:55 +0000)
helm/scripts/init.d/etc_default_helm_mowgli
helm/scripts/init.d/helm-rdfly_mowgli [new file with mode: 0755]

index 8f5b1edd64ef56081d7d76ceacfb50b7e183fd23..64ced1a2827776720582e4b3b3c6577e8ff69ee5 100644 (file)
@@ -9,6 +9,7 @@ DAEMONS="
   helm-draw-graph_mowgli
   helm-search-engine_mowgli
   helm-uwobo_mowgli
+  helm-rdfly_mowgli
 "
 
   # script used to load/unload uwobo predefined scripts
diff --git a/helm/scripts/init.d/helm-rdfly_mowgli b/helm/scripts/init.d/helm-rdfly_mowgli
new file mode 100755 (executable)
index 0000000..5ff1e67
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# init.d script for http_getter
+#
+# by --Zack <zack@cs.unibo.it>
+# Created: Tue,  8 Oct 2002 17:18:17 +0200
+# Last-Modified: Wed,  8 Jan 2003 12:09:41 +0100
+
+DAEMON="/projects/helm/daemons/rdfly/rdfly.opt"
+USAGE="Usage: /etc/init.d/helm-rdfly_mowgli { start | stop | restart }"
+
+if [ -f /etc/default/helm_mowgli ]; then
+  . /etc/default/helm_mowgli
+fi
+
+NAME=`basename $DAEMON`
+PIDFILE=/var/run/"$NAME"_mowgli.pid
+
+do_start () {
+  echo "Starting $DAEMON ..."
+  start-stop-daemon \
+    --start --background --pidfile $PIDFILE --make-pidfile \
+    --chuid $OWNER --exec $DAEMON
+}
+
+do_stop () {
+  echo "Stopping $DAEMON ..."
+  start-stop-daemon --stop --pidfile $PIDFILE && \
+  (if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi)
+}
+
+case "$1" in
+
+  start)
+    do_start
+    ;;
+
+  stop)
+    do_stop
+    ;;
+
+  restart)
+    do_stop
+    do_start
+    ;;
+
+  *)
+    echo "$USAGE" >&2
+    exit 1
+    ;;
+
+esac
+