wok-6.x view apache/stuff/apache @ rev 22628
updated dar (2.4.18 -> 2.6.7)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jan 13 07:45:07 2020 +0100 (2020-01-13) |
parents | 8ed3403d8a9e |
children |
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/apachectl
12 OPTIONS=$APACHE_OPTIONS
13 PIDFILE=/var/run/apache/httpd.pid
15 [ -d /var/run/apache ] || mkdir -p /var/run/apache
17 case "$1" in
18 start)
19 if active_pidfile $PIDFILE httpd ; then
20 _ '%s is already running.' $NAME
21 exit 1
22 fi
23 action 'Starting %s: %s...' "$DESC" $NAME
24 $DAEMON $OPTIONS -k start
25 status
26 ;;
27 stop)
28 if ! active_pidfile $PIDFILE httpd ; then
29 _ '%s is not running.' $NAME
30 exit 1
31 fi
32 action 'Stopping %s: %s...' "$DESC" $NAME
33 $DAEMON $OPTIONS -k stop
34 rm $PIDFILE
35 status
36 ;;
37 reload)
38 if ! active_pidfile $PIDFILE httpd ; then
39 _ '%s is not running.' $NAME
40 exit 1
41 fi
42 action 'Stopping %s: %s...' "$DESC" $NAME
43 $DAEMON $OPTIONS -k graceful
44 status
45 ;;
46 restart)
47 if ! active_pidfile $PIDFILE httpd ; then
48 _ '%s is not running.' $NAME
49 exit 1
50 fi
51 action 'Restarting %s: %s...' "$DESC" $NAME
52 $DAEMON $OPTIONS -k restart
53 status
54 ;;
55 *)
56 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|reload|restart]"
57 newline
58 exit 1
59 ;;
60 esac
62 exit 0