]> Frank Brehm's Git Trees - config/uhu1/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorroot <root@uhu1.uhu-banane.de>
Tue, 10 Apr 2012 08:39:17 +0000 (10:39 +0200)
committerroot <root@uhu1.uhu-banane.de>
Tue, 10 Apr 2012 08:39:17 +0000 (10:39 +0200)
.etckeeper
apache2/modules.d/._cfg0000_00_apache_manual.conf [new file with mode: 0644]
init.d/._cfg0000_apache2 [new file with mode: 0755]

index f751558f0036c929d53cc38caedac326a87bcce4..cf6ac2fd20b2a461ba1911a76691ac7aeb35c190 100755 (executable)
@@ -55,6 +55,7 @@ maybe chmod 0755 './apache2'
 maybe chmod 0644 './apache2/httpd.conf'
 maybe chmod 0644 './apache2/magic'
 maybe chmod 0755 './apache2/modules.d'
+maybe chmod 0644 './apache2/modules.d/._cfg0000_00_apache_manual.conf'
 maybe chmod 0644 './apache2/modules.d/.keep_dev-vcs_subversion-0'
 maybe chmod 0644 './apache2/modules.d/.keep_www-servers_apache-2'
 maybe chmod 0644 './apache2/modules.d/00_apache_manual.conf'
@@ -711,6 +712,7 @@ maybe chmod 0644 './idn.conf.sample'
 maybe chmod 0644 './idnalias.conf'
 maybe chmod 0644 './idnalias.conf.sample'
 maybe chmod 0755 './init.d'
+maybe chmod 0755 './init.d/._cfg0000_apache2'
 maybe chmod 0755 './init.d/._cfg0000_sshd'
 maybe chmod 0755 './init.d/acpid'
 maybe chmod 0755 './init.d/amavisd'
diff --git a/apache2/modules.d/._cfg0000_00_apache_manual.conf b/apache2/modules.d/._cfg0000_00_apache_manual.conf
new file mode 100644 (file)
index 0000000..25de5d1
--- /dev/null
@@ -0,0 +1,26 @@
+# Provide access to the documentation on your server as
+#  http://yourserver.example.com/manual/
+# The documentation is always available at
+#  http://httpd.apache.org/docs/2.2/
+<IfDefine MANUAL>
+AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|pt-br))?(/.*)?$ "/usr/share/doc/apache-2.2.22/manual$1"
+
+<Directory "/usr/share/doc/apache-2.2.22/manual">
+       Options Indexes
+       AllowOverride None
+       Order allow,deny
+       Allow from all
+
+       <Files *.html>
+               SetHandler type-map
+       </Files>
+
+       SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|pt-br)/ prefer-language=$1
+       RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|pt-br)){2,}(/.*)?$ /manual/$1$2
+
+       LanguagePriority en de es fr ja ko pt-br
+       ForceLanguagePriority Prefer Fallback
+</Directory>
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/init.d/._cfg0000_apache2 b/init.d/._cfg0000_apache2
new file mode 100755 (executable)
index 0000000..c3ce4e7
--- /dev/null
@@ -0,0 +1,182 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="configtest modules virtualhosts"
+extra_started_commands="configdump fullstatus graceful gracefulstop reload"
+
+description_configdump="Dumps the configuration of the runing apache server. Requires server-info to be enabled and www-client/lynx."
+description_configtest="Run syntax tests for configuration files."
+description_fullstatus="Gives the full status of the server. Requires lynx and server-status to be enabled."
+description_graceful="A graceful restart advises the children to exit after the current request and reloads the configuration."
+description_gracefulstop="A graceful stop advises the children to exit after the current request and stops the server."
+description_modules="Dump a list of loaded Static and Shared Modules."
+description_reload="Kills all children and reloads the configuration."
+description_virtualhosts="Show the settings as parsed from the config file (currently only shows the virtualhost settings)."
+description_stop="Kills all children and stops the server."
+
+depend() {
+       need net
+       use mysql dns logger netmount postgresql
+       after sshd
+}
+
+configtest() {
+       ebegin "Checking ${SVCNAME} configuration"
+       checkconfig
+       eend $?
+}
+
+checkconfd() {
+       if [ ! -f /etc/init.d/sysfs ]; then
+               eerror "This init script works only with openrc (baselayout-2)."
+               eerror "If you still need baselayout-1.x, please, use"
+               eerror "apache2.initd-baselayout-1 from /usr/share/doc/apache2-*/"
+       fi
+
+       PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
+       TIMEOUT=${TIMEOUT:-15}
+
+       SERVERROOT="${SERVERROOT:-/usr/lib64/apache2}"
+       if [ ! -d ${SERVERROOT} ]; then
+               eerror "SERVERROOT does not exist: ${SERVERROOT}"
+               return 1
+       fi
+
+       CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
+       [ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}"
+       if [ ! -r "${CONFIGFILE}" ]; then
+               eerror "Unable to read configuration file: ${CONFIGFILE}"
+               return 1
+       fi
+
+       APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
+       APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
+       [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
+
+       APACHE2="/usr/sbin/apache2"
+}
+
+checkconfig() {
+       checkconfd || return 1
+
+       ${APACHE2} ${APACHE2_OPTS} -t 1>/dev/null 2>&1
+       ret=$?
+       if [ $ret -ne 0 ]; then
+               eerror "${SVCNAME} has detected an error in your setup:"
+               ${APACHE2} ${APACHE2_OPTS} -t
+       fi
+
+       return $ret
+}
+
+start() {
+       checkconfig || return 1
+
+       ebegin "Starting ${SVCNAME}"
+       # Use start stop daemon to apply system limits #347301 
+       start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
+
+       i=0
+       while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
+               sleep 1 && i=$(expr $i + 1)
+       done
+
+       eend $(test $i -lt ${TIMEOUT})
+}
+
+stop() {
+       if [ "${RC_CMD}" = "restart" ]; then
+               checkconfig || return 1
+       else
+               checkconfd || return 1
+       fi
+
+       PID=$(cat "${PIDFILE}" 2>/dev/null)
+       if [ -z "${PID}" ]; then
+               einfo "${SVCNAME} not running (no pid file)"
+               return 0
+       fi
+
+       ebegin "Stopping ${SVCNAME}"
+       ${APACHE2} ${APACHE2_OPTS} -k stop
+
+       i=0
+       while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
+               && [ $i -lt ${TIMEOUT} ]; do
+               sleep 1 && i=$(expr $i + 1)
+       done
+
+       eend $(test $i -lt ${TIMEOUT})
+}
+
+reload() {
+       RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
+
+       checkconfig || return 1
+
+       if [ "${RELOAD_TYPE}" = "restart" ]; then
+               ebegin "Restarting ${SVCNAME}"
+               ${APACHE2} ${APACHE2_OPTS} -k restart
+               eend $?
+       elif [ "${RELOAD_TYPE}" = "graceful" ]; then
+               ebegin "Gracefully restarting ${SVCNAME}"
+               ${APACHE2} ${APACHE2_OPTS} -k graceful
+               eend $?
+       else
+               eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/${SVCNAME}"
+       fi
+}
+
+graceful() {
+       checkconfig || return 1
+       ebegin "Gracefully restarting ${SVCNAME}"
+       ${APACHE2} ${APACHE2_OPTS} -k graceful
+       eend $?
+}
+
+gracefulstop() {
+       checkconfig || return 1
+       ebegin "Gracefully stopping ${SVCNAME}"
+       ${APACHE2} ${APACHE2_OPTS} -k graceful-stop
+       eend $?
+}
+
+modules() {
+       checkconfig || return 1
+       ${APACHE2} ${APACHE2_OPTS} -M 2>&1
+}
+
+fullstatus() {
+       LYNX="${LYNX:-lynx -dump}"
+       STATUSURL="${STATUSURL:-http://localhost/server-status}"
+
+       if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then
+               eerror "lynx not found! you need to emerge www-client/lynx"
+       else
+               ${LYNX} ${STATUSURL}
+       fi
+}
+
+virtualhosts() {
+       checkconfig || return 1
+       ${APACHE2} ${APACHE2_OPTS} -S
+}
+
+configdump() {
+       LYNX="${LYNX:-lynx -dump}"
+       INFOURL="${INFOURL:-http://localhost/server-info}"
+
+       checkconfd || return 1
+
+       if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then
+               eerror "lynx not found! you need to emerge www-client/lynx"
+       else
+               echo "${APACHE2} started with '${APACHE2_OPTS}'"
+               for i in config server list; do
+                       ${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'
+               done
+       fi
+}
+
+# vim: ts=4 filetype=gentoo-init-d