2006-12-20 18:01:15 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2007-03-20 01:13:36 +01:00
|
|
|
# Copyright 2005 Peter Poeml <apache@suse.de>. All Rights Reserved.
|
2006-12-20 18:01:15 +01:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
|
|
|
|
sysconf=/etc/sysconfig/apache2
|
|
|
|
var=APACHE_SERVER_FLAGS
|
|
|
|
PATH="$PATH:/usr/bin:/usr/sbin"
|
|
|
|
|
|
|
|
debug=true
|
|
|
|
|
|
|
|
function usage() {
|
|
|
|
echo "$(basename $0): enable/disable a flag in $var in $sysconf"
|
|
|
|
echo
|
|
|
|
echo "usage: $(basename $0) [-d] flag"
|
|
|
|
#echo " $(basename $0) -h runtests"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
|
|
|
action=enable
|
|
|
|
case "$1" in
|
|
|
|
-d) action=disable; shift;;
|
|
|
|
-*) usage;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case $(basename $0) in
|
|
|
|
a2disflag) action=disable;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
flag=$1
|
|
|
|
|
|
|
|
|
|
|
|
if [ $action = enable ]; then
|
|
|
|
sysconf_addword $sysconf $var $flag
|
|
|
|
exit $?
|
|
|
|
else
|
|
|
|
sysconf_addword -r $sysconf $var $flag
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|