Skip to content

Commit 6036812

Browse files
committed
Keep changes made to awstats.tpl on upgrade
Users are required to apply a patch to update awstats.tpl on upgrade Hestia.
1 parent 1215cf9 commit 6036812

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
1717
- Fixed an issue where the "Saved confirmation" was not set due to a redirect #1879
1818
- Increased minimal memory requirements for ClamD / ClamAV. #1840
1919
- Restore of backup did not rebuild the "Forced SSL" and "HSTS" config on new account #1862
20+
- Keep changes made by /install/upgrade/manual/install_awstats_geopip.sh on update HestiaCP (via Discord)
2021

2122
## [1.4.2] - Service release
2223

bin/v-update-web-templates

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ source $HESTIA/conf/hestia.conf
2626
# Action #
2727
#----------------------------------------------------------#
2828

29+
# Check if /install/upgrade/manual/install_awstats_geoip.sh has been applied
30+
awstats_patch=$(cat $HESTIA/data/templates/web/awstats/awstats.tpl | grep "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\"");
31+
2932
# Update templates
3033
if [ -d "${WEBTPL}" ]; then
3134
rm -rf "${WEBTPL}/skel" 2>/dev/null
@@ -48,6 +51,11 @@ for php_ver in $(ls /etc/php/); do
4851
cp -f "$HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl" ${WEBTPL}/php-fpm/PHP-${php_ver/\./_}.tpl
4952
done
5053

54+
if [ ! -z "$awstats_patch" ]; then
55+
# restore LoadPlugin variable
56+
echo "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\"" >> $HESTIA/data/templates/web/awstats/awstats.tpl
57+
fi
58+
5159
# Rebuilding web domains
5260
if [ -z "$skip" ]; then
5361
for user in $($BIN/v-list-sys-users plain); do

0 commit comments

Comments
 (0)