We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a023dad commit 1ff34ceCopy full SHA for 1ff34ce
1 file changed
install/upgrade/0.10.0-190430.sh
@@ -5,9 +5,13 @@ HESTIA="/usr/local/hestia"
5
HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
6
hestiacp="$HESTIA/install/deb"
7
8
-# Add webmail alias variable to system configuration
9
-sed -i "/WEBMAIL_ALIAS/d" $HESTIA/conf/hestia.conf
10
-echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+# Add webmail alias variable to system configuration if non-existent
+webmail_alias_check=$(cat $HESTIA/conf/hestia.conf | grep WEBMAIL_ALIAS)
+if [ -z "$WEBMAIL_ALIAS_CHECK" ]; then
11
+ echo "(*) Adding global webmail alias to system configuration..."
12
+ sed -i "/WEBMAIL_ALIAS/d" $HESTIA/conf/hestia.conf
13
+ echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
14
+fi
15
16
# load hestia.conf
17
source $HESTIA/conf/hestia.conf
0 commit comments