File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ HESTIA="/usr/local/hestia"
55HESTIA_BACKUP=" /root/hst_upgrade/$( date +%d%m%Y%H%M) "
66hestiacp=" $HESTIA /install/deb"
77
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
8+ # Add webmail alias variable to system configuration if non-existent
9+ webmail_alias_check=$( cat $HESTIA /conf/hestia.conf | grep WEBMAIL_ALIAS)
10+ 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
1115
1216# load hestia.conf
1317source $HESTIA /conf/hestia.conf
You can’t perform that action at this time.
0 commit comments