]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/scripts/init.d/helm-proof-checker
removed tedious "_mowgli" postfix
[helm.git] / helm / scripts / init.d / helm-proof-checker
diff --git a/helm/scripts/init.d/helm-proof-checker b/helm/scripts/init.d/helm-proof-checker
new file mode 100755 (executable)
index 0000000..9ea0eaf
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# init.d script for HELM proof checker
+#
+# by --Zack <zack@cs.unibo.it>
+# Created: Wed,  9 Oct 2002 11:12:01 +0200
+# Last-Modified: Wed, 13 Nov 2002 18:30:39 +0100
+
+DAEMON=/projects/helm/daemons/proofChecker/proofChecker.opt
+USAGE="Usage: /etc/init.d/helm-proof-checker { start | stop | restart }"
+
+if [ -f /etc/default/helm ]; then
+  . /etc/default/helm
+fi
+
+NAME=`basename $DAEMON`
+PIDFILE=/var/run/$NAME.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
+