diff options
Diffstat (limited to 'src.etc/init.d/httpd')
-rwxr-xr-x | src.etc/init.d/httpd | 26 |
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}" |