summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/httpd
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-08-08 15:26:37 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-08-08 15:26:37 (EDT)
commit60ee13961584e957020d30daf287d03e55a50763 (patch)
treeb6058d13da6bc00efee4d61b635df2e1a0158701 /src.etc/init.d/httpd
parent6b4e7447cb8e8d4265c2c8d846ac39de449c1ab1 (diff)
Rewrite init scripts.
Diffstat (limited to 'src.etc/init.d/httpd')
-rwxr-xr-xsrc.etc/init.d/httpd26
1 files changed, 18 insertions, 8 deletions
diff --git a/src.etc/init.d/httpd b/src.etc/init.d/httpd
index 6a3045d..5f0106c 100755
--- a/src.etc/init.d/httpd
+++ b/src.etc/init.d/httpd
@@ -1,19 +1,29 @@
#!/bin/sh
+start()
+{
+ printf 'Starting httpd...'
+ start-stop-daemon -S -q -n httpd -x 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)
- printf 'Starting httpd...'
- start-stop-daemon -S -q -n httpd -x httpd -- -h /var/www
- printf 'done.'
+ start
;;
stop)
- printf 'Stopping httpd... '
- start-stop-daemon -K -q -n httpd
- printf 'done.'
+ stop
;;
restart)
- "${0}" stop
- "${0}" start
+ stop
+ start
;;
*)
printf 'Usage: %s {start|stop|restart}\n' "${0}"