]> matita.cs.unibo.it Git - helm.git/blob - helm/http_getter/helm-http-getter
* Abst removed from the DTD
[helm.git] / helm / http_getter / helm-http-getter
1 #!/bin/sh
2 #
3 # http-getter:       Starts the http-getter for project HELM
4 #
5 # Version:      /home/lpadovan/http_getter/http_getter.pl 0.1
6 #
7 # Author:       Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
8 #
9 # chkconfig: - 16 84
10 # description: this is an implementation of an HELM getter as a \
11 #              light http daemon. It allows URIs to be mapped to URLs \
12 #              and documents to be retrieved.
13 # processname: http_getter.pl
14 # config: /local/etc/helm/configuration.xml
15
16 # Source function library.
17 . /etc/rc.d/init.d/functions
18
19 RETVAL=0
20
21 # See how we were called.
22 case "$1" in
23   start)
24         echo -n "Starting HELM http-getter: "
25         export HELM_LIB_DIR=/projects/helm/on-line/local/lib/helm
26         daemon /projects/helm/http_getter/http_getter.pl &
27         RETVAL=$?
28         echo
29         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/http_getter.pl
30         ;;
31   stop)
32         echo -n "Stopping HELM http-getter: "
33         killproc http_getter.pl
34         RETVAL=$?
35         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/http_getter.pl
36         echo
37         ;;
38   status)
39         status http_getter.pl
40         RETVAL=$?
41         ;;
42   restart)
43         $0 stop
44         $0 start
45         RETVAL=$?
46         ;;
47   *)
48         echo "Usage: $0 {start|stop|status|restart}"
49         exit 1
50 esac
51
52 exit $RETVAL
53