]> matita.cs.unibo.it Git - helm.git/blob - helm/http_getter/helm-http-getter
This commit was manufactured by cvs2svn to create tag 'v0_0_2'.
[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         daemon /home/lpadovan/miohelm/http_getter/http_getter.pl &
26         RETVAL=$?
27         echo
28         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/http_getter.pl
29         ;;
30   stop)
31         echo -n "Stopping HELM http-getter: "
32         killproc http_getter.pl
33         RETVAL=$?
34         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/http_getter.pl
35         echo
36         ;;
37   status)
38         status http_getter.pl
39         RETVAL=$?
40         ;;
41   restart)
42         $0 stop
43         $0 start
44         RETVAL=$?
45         ;;
46   *)
47         echo "Usage: $0 {start|stop|status|restart}"
48         exit 1
49 esac
50
51 exit $RETVAL
52