From 16262790cb6ddacf6c632625cc865e03b1b8671f Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 25 Nov 2012 21:24:58 +0100 Subject: rcdscripts: import first snapshot of rc.d scripts as of 11.25.2012 In 30 days these scripts will start dissapearing from official Arch Linux packages. This is an attempt to conserve them, and keep sysvinit usable. --- src/apache/httpd | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100755 src/apache/httpd (limited to 'src/apache') diff --git a/src/apache/httpd b/src/apache/httpd new file mode 100755 index 0000000..6fa9c3c --- /dev/null +++ b/src/apache/httpd @@ -0,0 +1,65 @@ +#!/bin/bash + +daemon_name=httpd + +. /etc/rc.conf +. /etc/rc.d/functions + +APACHECTL=/usr/sbin/apachectl + +case "$1" in + start) + stat_busy "Starting Apache Web Server" + [ ! -d /var/run/httpd ] && install -d /var/run/httpd + if $APACHECTL start >/dev/null ; then + add_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping Apache Web Server" + if $APACHECTL stop >/dev/null ; then + rm_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + reload) + stat_busy "Reloading Apache Web Server" + if $APACHECTL graceful >/dev/null ; then + add_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + restart) + stat_busy "Restarting Apache Web Server" + if $APACHECTL restart >/dev/null ; then + add_daemon $daemon_name + stat_done + else + stat_fail + exit 1 + fi + ;; + + status) + stat_busy "Checking Apache Web Server status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|reload|restart|status}" +esac + +exit 0 -- cgit v1.2.3