]> matita.cs.unibo.it Git - helm.git/commitdiff
Script to start http-getter at boot time.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 12 Dec 2000 15:50:09 +0000 (15:50 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 12 Dec 2000 15:50:09 +0000 (15:50 +0000)
helm/http_getter/helm-http-getter [new file with mode: 0755]

diff --git a/helm/http_getter/helm-http-getter b/helm/http_getter/helm-http-getter
new file mode 100755 (executable)
index 0000000..5af0045
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# http-getter:       Starts the http-getter for project HELM
+#
+# Version:      /home/lpadovan/http_getter/http_getter.pl 0.1
+#
+# Author:       Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
+#
+# chkconfig: - 16 84
+# description: this is an implementation of an HELM getter as a \
+#              light http daemon. It allows URIs to be mapped to URLs \
+#              and documents to be retrieved.
+# processname: http_getter.pl
+# config: /local/etc/helm/configuration.xml
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+  start)
+       echo -n "Starting HELM http-getter: "
+       daemon /home/lpadovan/miohelm/http_getter/http_getter.pl &
+       RETVAL=$?
+       echo
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/http_getter.pl
+       ;;
+  stop)
+       echo -n "Stopping HELM http-getter: "
+       killproc http_getter.pl
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/http_getter.pl
+        echo
+       ;;
+  status)
+       status http_getter.pl
+       RETVAL=$?
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       RETVAL=$?
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|status|restart}"
+       exit 1
+esac
+
+exit $RETVAL
+