Skip to content

Commit bd9e1ad

Browse files
author
Kristan Kenney
committed
Add global webmail domain alias to upgrade script
1 parent 4cec15a commit bd9e1ad

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

install/upgrade/0.9.8-29.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ HESTIA="/usr/local/hestia"
55
HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
66
hestiacp="$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
11+
812
# load hestia.conf
913
source $HESTIA/conf/hestia.conf
1014

@@ -180,6 +184,34 @@ if [ -f /etc/nginx/conf.d/webmail.inc ]; then
180184
cp -f $HESTIA/install/deb/nginx/webmail.conf /etc/nginx/conf.d/webmail.conf
181185
fi
182186

187+
# Write web server configuration
188+
sed -i 's|%webmail_alias%|'$WEBMAIL_ALIAS'|g' /etc/apache2/conf.d/roundcube.conf
189+
sed -i 's|%domain%|'$domain'|g' /etc/apache2/conf.d/roundcube.conf
190+
sed -i 's|%domain_idn%|'$domain'|g' /etc/apache2/conf.d/roundcube.conf
191+
sed -i 's|%home%|'$HOMEDIR'|g' /etc/apache2/conf.d/roundcube.conf
192+
sed -i 's|%user%|'$user'|g' /etc/apache2/conf.d/roundcube.conf
193+
sed -i 's|%group%|'$user'|g' /etc/apache2/conf.d/roundcube.conf
194+
sed -i 's|%ip%|'$ipaddr'|g' /etc/apache2/conf.d/roundcube.conf
195+
sed -i 's|%web_port%|'$WEB_PORT'|g' /etc/apache2/conf.d/roundcube.conf
196+
sed -i 's|%proxy_port%|'$PROXY_PORT'|g' /etc/apache2/conf.d/roundcube.conf
197+
sed -i 's|%web_ssl_port%|'$WEB_SSL_PORT'|g' /etc/apache2/conf.d/roundcube.conf
198+
sed -i 's|%proxy_ssl_port%|'$PROXY_SSL_PORT'|g' /etc/apache2/conf.d/roundcube.conf
199+
sed -i 's|%web_system%|'$WEB_SYSTEM'|g' /etc/apache2/conf.d/roundcube.conf
200+
201+
# Write proxy server configurationls
202+
sed -i 's|%webmail_alias%|'$WEBMAIL_ALIAS'|g' /etc/nginx/conf.d/webmail.conf
203+
sed -i 's|%domain%|'$domain'|g' /etc/nginx/conf.d/webmail.conf
204+
sed -i 's|%domain_idn%|'$domain'|g' /etc/nginx/conf.d/webmail.conf
205+
sed -i 's|%home%|'$HOMEDIR'|g' /etc/nginx/conf.d/webmail.conf
206+
sed -i 's|%user%|'$user'|g' /etc/nginx/conf.d/webmail.conf
207+
sed -i 's|%group%|'$user'|g' /etc/nginx/conf.d/webmail.conf
208+
sed -i 's|%ip%|'$ipaddr'|g' /etc/nginx/conf.d/webmail.conf
209+
sed -i 's|%web_port%|'$WEB_PORT'|g' /etc/nginx/conf.d/webmail.conf
210+
sed -i 's|%proxy_port%|'$PROXY_PORT'|g' /etc/nginx/conf.d/webmail.conf
211+
sed -i 's|%web_ssl_port%|'$WEB_SSL_PORT'|g' /etc/nginx/conf.d/webmail.conf
212+
sed -i 's|%proxy_ssl_port%|'$PROXY_SSL_PORT'|g' /etc/nginx/conf.d/webmail.conf
213+
sed -i 's|%web_system%|'$WEB_SYSTEM'|g' /etc/nginx/conf.d/webmail.conf
214+
183215
# Add IMAP system variable to configuration if dovecot is installed
184216
if [ -z "$IMAP_SYSTEM" ]; then
185217
if [ -f /usr/bin/dovecot ]; then

0 commit comments

Comments
 (0)