File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22# info: change webmail alias url
3- # options: USER DOMAIN
3+ # options: WEBMAIL
44#
55# This function changes the webmail url in apache2 or nginx configuration.
66
3434# Set new webmail alias
3535$BIN /v-change-sys-config-value ' WEBMAIL_ALIAS' $NEW_ALIAS
3636
37+ # Add new webmail configuration
3738for user in ` ls /usr/local/hestia/data/users/` ; do
3839 for domain in $( $BIN /v-list-mail-domains $user plain | cut -f 1) ; do
3940 $BIN /v-add-sys-webmail $user $domain
4445if [ " $WEB_SYSTEM " = " apache2" ]; then
4546 sed -i " s|Alias \/$OLD_ALIAS |Alias \/$NEW_ALIAS |gI" /etc/apache2/conf.d/roundcube.conf
4647fi
47-
48- sed -i " s|location \/$OLD_ALIAS |location \/$NEW_ALIAS |gI" /etc/nginx/conf.d/webmail.inc
48+ if [ -e " /etc/nginx/conf.d/webmail.inc" ]; then
49+ sed -i " s|location \/$OLD_ALIAS |location \/$NEW_ALIAS |gI" /etc/nginx/conf.d/webmail.inc
50+ fi
4951
5052# ----------------------------------------------------------#
5153# Hestia #
You can’t perform that action at this time.
0 commit comments