Skip to content

Commit

Permalink
add more detection for duplicate mod_setenv
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Nov 13, 2020
1 parent 723832b commit e1c1614
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,15 @@ then

ln -s -f /etc/lighttpd/conf-available/87-mod_setenv.conf /etc/lighttpd/conf-enabled/87-mod_setenv.conf
ln -s -f /etc/lighttpd/conf-available/47-stat-cache.conf /etc/lighttpd/conf-enabled/47-stat-cache.conf
#lighttpd -tt -f /etc/lighttpd/lighttpd.conf && echo success || true

if lighttpd -tt -f /etc/lighttpd/lighttpd.conf 2>&1 | grep mod_setenv >/dev/null
then
rm -f /etc/lighttpd/conf-enabled/87-mod_setenv.conf
fi
if (( $(cat /etc/lighttpd/conf-enabled/* | grep -c -E -e 'server.modules.?\+=.?\(.?"mod_setenv".?\)') > 1 )); then
rm -f /etc/lighttpd/conf-enabled/87-mod_setenv.conf
fi

#lighttpd -tt -f /etc/lighttpd/lighttpd.conf && echo success || true
if lighttpd -tt -f /etc/lighttpd/lighttpd.conf 2>&1 | grep stat-cache >/dev/null
then
rm -f /etc/lighttpd/conf-enabled/47-stat-cache.conf
Expand Down

0 comments on commit e1c1614

Please sign in to comment.