forked from pool/apache2
Accepting request 81909 from home:fcrozat:systemd
- Add apache2-systemd-ask-pass / apache2.service / start_apache2 and modify apache2-ssl-global.conf for systemd support (bnc#697137). OBS-URL: https://build.opensuse.org/request/show/81909 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=335
This commit is contained in:
committed by
Git OBS Bridge
parent
90508856d0
commit
f247c8cfd7
51
start_apache2
Normal file
51
start_apache2
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
|
||||
# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
|
||||
# Copyright (c) 2002, 2003, (2004?) SuSE Linux AG
|
||||
# Copyright (c) 2004(?), 2005, 2006, 2007, 2008 SUSE Linux Products GmbH
|
||||
#
|
||||
# Authors: Rolf Haberrecker <apache@suse.de>, 2001
|
||||
# Peter Poeml <apache@suse.de>, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
# 2008, 2009, 2010
|
||||
#
|
||||
#
|
||||
pname=apache2
|
||||
. /usr/share/$pname/load_configuration
|
||||
|
||||
export ${!APACHE_*}
|
||||
|
||||
apache_link=/usr/sbin/httpd2
|
||||
apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
|
||||
httpd_conf=${APACHE_HTTPD_CONF:-/etc/apache2/httpd.conf}
|
||||
|
||||
test -L $apache_link && apache_bin=$(readlink $apache_link)
|
||||
|
||||
if [ -z "$APACHE_MPM" ]; then
|
||||
APACHE_MPM=${apache_bin##*-}
|
||||
fi
|
||||
|
||||
if ! [ -x $apache_bin ]; then
|
||||
echo >&2 $apache_bin-$APACHE_MPM is not a valid httpd2 binary.
|
||||
echo >&2 Check your APACHE_MPM setting in /etc/sysconfig/$pname.
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# a proper home should be set, otherwise the server might end up
|
||||
# with HOME=/root and some script might try to use that
|
||||
HOME=/var/lib/apache2
|
||||
|
||||
unset server_flags
|
||||
case "$action" in startssl) server_flags="-DSSL";; esac
|
||||
for i in $APACHE_SERVER_FLAGS; do
|
||||
case $i in
|
||||
-D) ;;
|
||||
-D*) server_flags="$server_flags $i";;
|
||||
*) server_flags="$server_flags -D$i";;
|
||||
esac
|
||||
done
|
||||
${get_module_list_done:=false} || /usr/share/$pname/get_module_list && export get_module_list_done=true
|
||||
${get_includes:=false} || /usr/share/$pname/get_includes && export get_includes_done=true
|
||||
|
||||
export -n ${!APACHE_*}
|
||||
exec $apache_bin -f $httpd_conf $server_flags $@
|
Reference in New Issue
Block a user