Browse Source

Fix check of webmail.inc file

Kristan Kenney 6 years ago
parent
commit
51b2d2d6e4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bin/v-change-sys-webmail

+ 3 - 1
bin/v-change-sys-webmail

@@ -44,7 +44,9 @@ done
 if [ "$WEB_SYSTEM" = 'apache2' ]; then
 if [ "$WEB_SYSTEM" = 'apache2' ]; then
     sed -i "s|Alias \/$OLD_ALIAS|Alias \/$NEW_ALIAS|gI" /etc/apache2/conf.d/roundcube.conf
     sed -i "s|Alias \/$OLD_ALIAS|Alias \/$NEW_ALIAS|gI" /etc/apache2/conf.d/roundcube.conf
 fi
 fi
-sed -i "s|location \/$OLD_ALIAS|location \/$NEW_ALIAS|gI" /etc/nginx/conf.d/webmail.inc
+if [ -e /etc/nginx/conf.d/webmail.inc ]; then
+    sed -i "s|location \/$OLD_ALIAS|location \/$NEW_ALIAS|gI" /etc/nginx/conf.d/webmail.inc
+fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #