From 60ee13961584e957020d30daf287d03e55a50763 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 08 Aug 2013 15:26:37 -0400 Subject: Rewrite init scripts. --- (limited to 'src.etc/init.d/httpd') 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}" -- cgit v0.9.1