wok view apache/stuff/apache @ rev 8221
imported patch cleanup_inprogress/slitaz-i18n.patch
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Thu Jan 27 00:20:50 2011 +0100 (2011-01-27) |
parents | 00c9a8ae56b4 |
children | 390a5a938ba6 |
line source
1 #!/bin/sh
2 # /etc/init.d/apache: Start, stop and restart Apache web server on SliTaz,
3 # at boot time or with the command line. Daemons options are configured
4 # with /etc/daemons.conf
5 #
6 . /etc/init.d/rc.functions
7 . /etc/daemons.conf
9 NAME=Apache
10 DESC="Apache Web Server"
11 DAEMON=/usr/bin/httpd
12 OPTIONS=
13 PIDFILE=/var/run/apache/httpd.pid
15 case "$1" in
16 start)
17 if active_pidfile $PIDFILE httpd ; then
18 echo "$NAME already running."
19 exit 1
20 fi
21 echo -n "Starting $DESC: $NAME... "
22 $DAEMON $OPTIONS -k start
23 status
24 ;;
25 stop)
26 if ! active_pidfile $PIDFILE httpd ; then
27 echo "$NAME is not running."
28 exit 1
29 fi
30 echo -n "Stopping $DESC: $NAME... "
31 $DAEMON $OPTION -k stop
32 rm $PIDFILE
33 status
34 ;;
35 reload)
36 if ! active_pidfile $PIDFILE httpd ; then
37 echo "$NAME is not running."
38 exit 1
39 fi
40 echo -n "Stopping $DESC: $NAME... "
41 $DAEMON $OPTION -k graceful
42 status
43 ;;
44 restart)
45 if ! active_pidfile $PIDFILE httpd ; then
46 echo "$NAME is not running."
47 exit 1
48 fi
49 echo -n "Restarting $DESC: $NAME... "
50 $DAEMON $OPTIONS -k restart
51 status
52 ;;
53 *)
54 echo ""
55 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|reload|restart]"
56 echo ""
57 exit 1
58 ;;
59 esac
61 exit 0