/[hydra]/hydra/contrib/redhat/rc.hydra
ViewVC logotype

Contents of /hydra/contrib/redhat/rc.hydra

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Wed Jan 22 07:47:39 2003 UTC (18 years, 4 months ago) by nmav
Branch: MAIN
CVS Tags: hydra_0_1_6_without_hic, hydra_0_1_7, hydra_0_1_6, hydra_0_1_4, hydra_0_1_8, HEAD
Changes since 1.1: +106 -0 lines
added missing redhat directory

1 #!/bin/bash
2 #
3 # $Id: rc.hydra,v 1.1.2.1 2003/01/05 16:58:06 nmav Exp $
4 #
5 # /etc/rc.d/init.d/hydra
6 #
7 # Starts the Hydra HTTP Daemon
8 #
9 # chkconfig: 2345 80 30
10 # description: Multithreaded Web Server
11 # processname: httpd
12
13 config=/etc/hydra/hydra.conf
14 prefix=/usr/local
15
16 test -x ${prefix}/bin/hydra || exit 0
17 [ -f ${config} ] || exit 1
18
19 # Source function library.
20 . /etc/rc.d/init.d/functions
21
22 # Source networking configuration.
23 . /etc/sysconfig/network
24
25 # Check that networking is up.
26 [ ${NETWORKING} = "no" ] && exit 0
27
28 RETVAL=0
29
30 start() {
31 echo -n 'Starting Hydra: '
32 daemon ${prefix}/bin/hydra
33 RETVAL=$?
34 echo
35 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hydra
36 return $RETVAL
37 }
38
39 stop() {
40 echo -n 'Shutting down Hydra: '
41 killproc hydra
42 RETVAL=$?
43 echo
44 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/hydra
45 rm -f /var/run/hydra.pid
46 return $RETVAL
47 }
48
49 restart() {
50 stop
51 start
52 }
53
54 reload() {
55 echo -n "Reloading configuration: "
56 killproc hydra -HUP
57 RETVAL=$?
58 echo
59 return $RETVAL
60 }
61
62 condrestart() {
63 [ -e /var/lock/subsys/hydra ] && restart
64 return 0
65 }
66
67 stats() {
68 echo -n "Dumping statistics to ErrorLog: "
69 killproc hydra -USR1
70 RETVAL=$?
71 echo
72 return $RETVAL
73 }
74
75 #
76 # See how we were called.
77 #
78 case "$1" in
79 start)
80 start
81 ;;
82 stop)
83 stop
84 ;;
85 status)
86 status hydra
87 ;;
88 restart)
89 restart
90 ;;
91 condrestart)
92 condrestart
93 ;;
94 reload)
95 reload
96 ;;
97 stats)
98 stats
99 ;;
100 *)
101 echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|stats}"
102 RETVAL=1
103 esac
104
105 exit $RETVAL
106

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26