Skip to content

Commit af3e118

Browse files
author
Kristan Kenney
committed
Detect webalizer during upgrade
Do not replace variable if webalizer is not installed
1 parent d7cc126 commit af3e118

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

install/upgrade/0.10.0-190430.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,12 @@ if [ -z "$IMAP_SYSTEM" ]; then
288288
fi
289289

290290
# Remove Webalizer and set AWStats as default
291-
echo "(*) Removing Webalizer and setting AWStats as default web statistics backend..."
292-
apt purge webalizer -y > /dev/null 2>&1
293-
sed -i "s/STATS_SYSTEM='webalizer,awstats'/STATS_SYSTEM='awstats'/g" $HESTIA/conf/hestia.conf
291+
WEBALIAZER_CHECK=$(cat $HESTIA/conf/hestia.conf | grep webalizer)
292+
if [ ! -z "$WEBALIZER_CHECK "]; then
293+
echo "(*) Removing Webalizer and setting AWStats as default web statistics backend..."
294+
apt purge webalizer -y > /dev/null 2>&1
295+
sed -i "s/STATS_SYSTEM='webalizer,awstats'/STATS_SYSTEM='awstats'/g" $HESTIA/conf/hestia.conf
296+
fi
294297

295298
# Run sftp jail once
296299
$HESTIA/bin/v-add-sys-sftp-jail

0 commit comments

Comments
 (0)