Fixes for Webalizer

This commit is contained in:
earnolmartin 2019-12-10 10:13:28 -07:00
parent 7d4bec6e94
commit ee49ef4407
2 changed files with 10 additions and 8 deletions

View file

@ -3110,6 +3110,10 @@ function upgradeWebalizer(){
aptgetInstall libdb++-dev
aptgetInstall libgd-dev
apt-get purge -y webalizer
if [ -e "/root/Downloads/webalizer" ]; then
rm -rf "/root/Downloads/webalizer"
fi
# Handle updated geodb files
mkdir -p /root/Downloads/webalizer
@ -3128,10 +3132,7 @@ function upgradeWebalizer(){
wget -N "https://launchpadlibrarian.net/251786296/webalizer-2.23-08-memmove.patch"
patch < webalizer-2.23-08-memmove.patch
./configure --sysconfdir=/etc --enable-dns --with-geodb=/usr/share/GeoIP2 --enable-bz2 --enable-geoip
make
make install
echo "1" > "/etc/ehcp/webalizer_patched"
./configure --sysconfdir=/etc --enable-dns --with-geodb=/usr/share/GeoIP2 --enable-bz2 --enable-geoip && make && make install && echo "1" > "/etc/ehcp/webalizer_patched" || rm -rf "/etc/ehcp/webalizer_patched"
}
###############################

View file

@ -2830,6 +2830,10 @@ function upgradeWebalizer(){
aptgetInstall libdb++-dev
aptgetInstall libgd-dev
apt-get purge -y webalizer
if [ -e "/root/Downloads/webalizer" ]; then
rm -rf "/root/Downloads/webalizer"
fi
# Handle updated geodb files
mkdir -p /root/Downloads/webalizer
@ -2848,10 +2852,7 @@ function upgradeWebalizer(){
wget -N "https://launchpadlibrarian.net/251786296/webalizer-2.23-08-memmove.patch"
patch < webalizer-2.23-08-memmove.patch
./configure --sysconfdir=/etc --enable-dns --with-geodb=/usr/share/GeoIP2 --enable-bz2 --enable-geoip
make
make install
echo "1" > "/etc/ehcp/webalizer_patched"
./configure --sysconfdir=/etc --enable-dns --with-geodb=/usr/share/GeoIP2 --enable-bz2 --enable-geoip && make && make install && echo "1" > "/etc/ehcp/webalizer_patched" || rm -rf "/etc/ehcp/webalizer_patched"
}
#############################################################