File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
upgrade/versions/previous Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ get_user_ip
4343
4444check_args ' 2' " $# " ' USER DOMAIN [RESTART]'
4545is_format_valid ' user' ' domain'
46- is_system_enabled " $MAIL_SYSTEM " ' MAIL_SYSTEM'
4746is_system_enabled " $WEB_SYSTEM " ' WEB_SYSTEM'
4847is_system_enabled " $IMAP_SYSTEM " ' IMAP_SYSTEM'
4948is_object_valid ' user' ' USER' " $user "
@@ -55,8 +54,10 @@ is_object_unsuspended 'mail' 'DOMAIN' "$domain"
5554# Action #
5655# ----------------------------------------------------------#
5756
58- # Verify that webmail alias variable exists
59- if [ ! -z " $WEBMAIL_ALIAS " ]; then
57+ # Verify that webmail alias variable exists and create it if it does not
58+ if [ -z " $WEBMAIL_ALIAS " ]; then
59+ $BIN /v-change-sys-config-value ' WEBMAIL_ALIAS' " webmail"
60+ else
6061 # Ensure DNS record exists if Hestia is hosting DNS zones
6162 if [ ! -z " $DNS_SYSTEM " ]; then
6263 dns_domain=$( $BIN /v-list-dns-domains $user | grep $domain | cut -d' ' -f1)
@@ -91,8 +92,6 @@ if [ ! -z "$WEBMAIL_ALIAS" ]; then
9192 add_webmail_config " $PROXY_SYSTEM " " default.stpl"
9293 fi
9394 fi
94- else
95- echo " Error: WEBMAIL_ALIAS is not defined in hestia.conf"
9695fi
9796
9897# ----------------------------------------------------------#
Original file line number Diff line number Diff line change 10271027# Mail stack
10281028if [ " $exim " = ' yes' ]; then
10291029 echo " MAIL_SYSTEM='exim4'" >> $HESTIA /conf/hestia.conf
1030- echo " WEBMAIL_ALIAS='webmail'" >> $HESTIA /conf/hestia.conf
10311030 if [ " $clamd " = ' yes' ]; then
10321031 echo " ANTIVIRUS_SYSTEM='clamav-daemon'" >> $HESTIA /conf/hestia.conf
10331032 fi
Original file line number Diff line number Diff line change 77# ######################################################################################
88
99# Add webmail alias variable to system configuration if non-existent
10- WEBMAIL_ALIAS_CHECK=$( cat $HESTIA /conf/hestia.conf | grep WEBMAIL_ALIAS)
11- if [ -z " $WEBMAIL_ALIAS_CHECK " ]; then
12- echo " (*) Adding global webmail alias to system configuration..."
13- sed -i " /WEBMAIL_ALIAS/d" $HESTIA /conf/hestia.conf
14- echo " WEBMAIL_ALIAS='webmail'" >> $HESTIA /conf/hestia.conf
10+ if [ -z " $WEBMAIL_ALIAS " ]; then
11+ echo " (*) Updating webmail alias configuration..."
12+ $HESTIA /bin/v-change-sys-config-value ' WEBMAIL_ALIAS' " webmail"
1513fi
1614
1715# Update Apache and Nginx configuration to support new file structure
You can’t perform that action at this time.
0 commit comments