apache2/a2enmod
Kristyna Streitova de7dee913a Accepting request 316550 from home:pgajdos
- access_compat shared also for 11sp3

- apache2-implicit-pointer-decl.patch renamed to 
  httpd-implicit-pointer-decl.patch to align with other
  patches names

- apachectl is now wrapper to start_apache2; therefore, it honors 
  HTTPD_INSTANCE variable, see README-instances.txt for details 
  + httpd-apachectl.patch
  - httpd-2.4.10-apachectl.patch

- a2enmod/a2dismod and a2enflag/a2disflag now respect 
  HTTPD_INSTANCE=<instance_name> environment variable, which can be 
  used to specify apache instance name; sysconfig file is expected 
  at /etc/sysconfig/apache2@<instance_name> 
 (see README-instances.txt for details)

- provides suse_maintenance_mmn symbol [bnc#915666] (internal)

- credits to Roman Drahtmueller:
  * add reference to /etc/permissions.local to output of %post if
    setting the permissions of suexec2 fails
  * do not enable mod_php5 by default any longer
  * httpd-2.0.49-log_server_status.dif obsoleted
  * apache2-mod_ssl_npn.patch removed because not used
  * include mod_reqtimeout.conf in httpd.conf
  * added cgid-timeout.conf, include
    it in httpd.conf
- fix default value APACHE_MODULES in sysconfig file
- %service_* macros for apache2@.service

OBS-URL: https://build.opensuse.org/request/show/316550
OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=453
2015-07-14 09:04:22 +00:00

69 lines
1.6 KiB
Bash

#!/bin/bash
# Copyright 2005 Peter Poeml <apache@suse.de>. All Rights Reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
function usage() {
echo "$(basename $0): enable/disable an apache module in $var in $sysconf"
echo
echo "usage: $(basename $0) [-d] module"
echo " $(basename $0) -l list modules"
echo " $(basename $0) -q module query if module is installed"
echo
echo "HTTPD_INSTANCE=<instance_name> environment variable can be used to specify"
echo "apache instance (see README-instances.txt); sysconfig file is expected"
echo "at /etc/sysconfig/apache2@<instance_name> ."
exit 1
}
unset instance_suffix
if [ -n "$HTTPD_INSTANCE" ]; then
instance_suffix="@$HTTPD_INSTANCE"
fi
sysconf=/etc/sysconfig/apache2$instance_suffix
var=APACHE_MODULES
PATH="$PATH:/usr/bin:/usr/sbin:/usr/share/apache2"
if [ $# -lt 1 ]; then
usage
fi
action=enable
case "$1" in
-d) action=disable; shift;;
-l) action=list; shift;;
-q) action=query; shift;;
-*) usage;;
esac
case $(basename $0) in
a2dismod) action=disable;;
esac
mod=$1
if [ $action = enable ]; then
sysconf_addword $sysconf $var $mod
exit $?
elif [ $action = disable ]; then
sysconf_addword -r $sysconf $var $mod
exit $?
elif [ $action = query ]; then
if a2enmod -l | grep -q "\<$mod\>"; then
exit 0
else
exit 1
fi
else
source $sysconf
eval echo \$$var
fi