File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,23 +34,23 @@ if [ -f /etc/apache2/conf.d/roundcube.conf ]; then
3434fi
3535
3636# Get existing nginx webmail alias
37- if [ -f /etc/nginx/conf.d/roundcube .inc ]; then
37+ if [ -f /etc/nginx/conf.d/webmail .inc ]; then
3838 nginx_webmail=$( cat /etc/nginx/conf.d/webmail.inc | grep " location" | { IFS=' ' ; read -r -a array; echo " ${array[1]} " ; })
3939fi
4040
4141# Check if alias is different for apache2
42- if [ -z " $apache_webmail " ]; then
42+ if [ ! -z " $apache_webmail " ]; then
4343 if [ ! " $apache_webmail " = " $WEBMAIL " ]; then
4444 # Replace webmail alias in config files.
45- sed -i " 3/ s|Alias $apache_webmail |Alias $WEBMAIL |" /etc/apache2/conf.d/roundcube.conf
45+ sed -i " s|Alias $apache_webmail |Alias $WEBMAIL |" /etc/apache2/conf.d/roundcube.conf
4646
4747 # Restart services
4848 $HESTIA /bin/v-restart-service apache2
4949 fi
5050fi
5151
5252# Check if alias is different for nginx
53- if [ -z " $nginx_webmail " ]; then
53+ if [ ! -z " $nginx_webmail " ]; then
5454 if [ ! " $nginx_webmail " = " $WEBMAIL " ]; then
5555 # Replace webmail alias in config files.
5656 sed -i " s|$nginx_webmail |$WEBMAIL |" /etc/nginx/conf.d/webmail.inc
You can’t perform that action at this time.
0 commit comments