Use persitent directory

This commit is contained in:
Brice Waegeneire 2020-09-29 11:40:55 +02:00
parent bd5a09e17e
commit 5c17a30640

View file

@ -7,8 +7,9 @@ set -e
apache_dir=/etc/apache2
apache_conf=$apache_dir/apache2.conf
tmp_dir=$(mktemp -d /tmp/apache-require.XXXX)
tmp_dir=/tmp/apache-require
conf_files=$tmp_dir/conf_files
mkdir -p "$tmp_dir"
module_loaded() {
apache2ctl -D DUMP_MODULES | grep -q access_compat_module
@ -17,7 +18,7 @@ module_loaded() {
# Get all config files included the
get_conf_files() {
# Initialize le the list of configuration files with the default conf
printf "%s\\n" $apache_conf > "$conf_files"
test ! -e "$conf_files" && printf "%s\\n" $apache_conf > "$conf_files"
cd "$apache_dir"
# TODO: Refactor this mess