summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/httpd
blob: 1dc0d28803ddcd027440ba5ec457143585d8bc67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

start()
{
	printf 'Starting httpd... '
	start-stop-daemon -S -q -n httpd -x /usr/sbin/httpd -- -h /var/www
	printf 'done.\n'
}

stop()
{
	printf 'Stopping httpd... '
	start-stop-daemon -K -q -n httpd
	printf 'done.\n'
}

case "${1}" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		stop
		start
		;;
	*)
		printf 'Usage: %s {start|stop|restart}\n' "${0}" >&2
		exit 1
		;;
esac