]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/init.d/apache
dnsmasq: Make command line customizeable.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / apache
CommitLineData
23104841
MT
1#!/bin/sh
2# Begin $rc_base/init.d/apache
3
4# Based on sysklogd script from LFS-3.1 and earlier.
5# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
23104841
MT
7. /etc/sysconfig/rc
8. $rc_functions
9
10case "$1" in
11 start)
12 boot_mesg "Starting Apache daemon..."
65998e0a
MT
13 if [ -f /etc/httpd/server.key -a -f /etc/httpd/server.crt -a -f /etc/httpd/server.csr ]; then
14 /usr/local/bin/httpscert read >/dev/null 2>&1
15 else
16 /usr/local/bin/httpscert new >/dev/null 2>&1
17 fi
23104841
MT
18 /usr/sbin/apachectl -k start
19 evaluate_retval
20 ;;
21
22 stop)
23 boot_mesg "Stopping Apache daemon..."
24 /usr/sbin/apachectl -k stop
25 evaluate_retval
26 ;;
27
28 restart)
29 boot_mesg "Restarting Apache daemon..."
30 /usr/sbin/apachectl -k restart
31 evaluate_retval
32 ;;
256575b3
CS
33
34 reload)
35 boot_mesg "Reloading Apache daemon..."
36 /usr/sbin/apachectl -k graceful
37 evaluate_retval
38 ;;
23104841
MT
39
40 status)
41 statusproc /usr/sbin/httpd
42 ;;
43
44 *)
45 echo "Usage: $0 {start|stop|restart|status}"
46 exit 1
47 ;;
48esac
49
50# End $rc_base/init.d/apache