]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/init.d/apache
rngd: Mix-in RDRAND and reload for HWRNGs added at runtime.
[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)
65998e0a
MT
12 if [ -f /etc/httpd/server.key -a -f /etc/httpd/server.crt -a -f /etc/httpd/server.csr ]; then
13 /usr/local/bin/httpscert read >/dev/null 2>&1
14 else
75474c3c 15 boot_mesg "Generating https host certificate... this may take some minutes..."
65998e0a 16 /usr/local/bin/httpscert new >/dev/null 2>&1
75474c3c 17 evaluate_retval
65998e0a 18 fi
75474c3c 19 boot_mesg "Starting Apache daemon..."
23104841
MT
20 /usr/sbin/apachectl -k start
21 evaluate_retval
22 ;;
23
24 stop)
25 boot_mesg "Stopping Apache daemon..."
26 /usr/sbin/apachectl -k stop
27 evaluate_retval
28 ;;
29
30 restart)
31 boot_mesg "Restarting Apache daemon..."
32 /usr/sbin/apachectl -k restart
33 evaluate_retval
34 ;;
256575b3
CS
35
36 reload)
37 boot_mesg "Reloading Apache daemon..."
38 /usr/sbin/apachectl -k graceful
39 evaluate_retval
40 ;;
23104841
MT
41
42 status)
43 statusproc /usr/sbin/httpd
44 ;;
45
46 *)
47 echo "Usage: $0 {start|stop|restart|status}"
48 exit 1
49 ;;
50esac
51
52# End $rc_base/init.d/apache