From d07f708fe0e9a70f2740ab7e1c4fbe5a0f0f00ba Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 20 Feb 2004 14:55:53 +0000 Subject: [PATCH] A brand new daemon: rdfly. --- helm/scripts/init.d/etc_default_helm_mowgli | 1 + helm/scripts/init.d/helm-rdfly_mowgli | 53 +++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 helm/scripts/init.d/helm-rdfly_mowgli diff --git a/helm/scripts/init.d/etc_default_helm_mowgli b/helm/scripts/init.d/etc_default_helm_mowgli index 8f5b1edd6..64ced1a28 100644 --- a/helm/scripts/init.d/etc_default_helm_mowgli +++ b/helm/scripts/init.d/etc_default_helm_mowgli @@ -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 index 000000000..5ff1e67ec --- /dev/null +++ b/helm/scripts/init.d/helm-rdfly_mowgli @@ -0,0 +1,53 @@ +#!/bin/sh +# +# init.d script for http_getter +# +# by --Zack +# 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 + -- 2.39.2