Browse Source

Update Roundcube password plugin when changing hostname

Kristan Kenney 4 năm trước cách đây
mục cha
commit
d41a1c4f5b
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      bin/v-change-sys-hostname

+ 5 - 0
bin/v-change-sys-hostname

@@ -51,6 +51,11 @@ else
     # Debian/Ubuntu
     # Debian/Ubuntu
     hostnamectl set-hostname $domain
     hostnamectl set-hostname $domain
     echo "$domain" > /etc/hostname
     echo "$domain" > /etc/hostname
+
+    # Update Roundcube password plugin configuration
+    if [ -d /etc/roundcube/ ]; then
+        sed -i "/password_hestia_host/c\$rcmail_config['password_hestia_host'] = '$domain';" /etc/roundcube/plugins/password/config.inc.php
+    fi
 fi
 fi
 
 
 # Update ip helo for exim
 # Update ip helo for exim