Skip to content

Commit ecf6c3e

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#1755 from jaapmarcus/fix/password-change-rainloop
Change rainloop config file on hostname change
2 parents 6c882c7 + 4d03a89 commit ecf6c3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/v-change-sys-hostname

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# Argument definition
1616
domain=$1
17-
helo="${2-yes}"
17+
helo=${2-yes}
1818

1919
# Includes
2020
# shellcheck source=/usr/local/hestia/func/main.sh
@@ -57,10 +57,13 @@ else
5757
if [ -d /etc/roundcube/ ]; then
5858
sed -i "/password_hestia_host/c\$rcmail_config['password_hestia_host'] = '$domain';" /etc/roundcube/plugins/password/config.inc.php
5959
fi
60+
if [ -d /etc/rainloop/ ]; then
61+
sed -i "/hestia_host/c\hestia_host = \"$domain\"" /etc/rainloop/data/_data_/_default_/configs/plugin-hestia-change-password.ini
62+
fi
6063
fi
6164

6265
# Update ip helo for exim
63-
if [[ ! -z "$MAIL_SYSTEM" && "$helo" == "yes" ]]; then
66+
if [[] ! -z "$MAIL_SYSTEM" && "$helo" == "yes" ]]; then
6467
pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
6568
$BIN/v-change-sys-ip-helo $pub_ip $domain
6669
fi
@@ -70,6 +73,7 @@ fi
7073
#----------------------------------------------------------#
7174

7275
# Logging
76+
$BIN/v-log-action "system" "Warning" "System" "System hostname changed (Host: $domain)."
7377
log_event "$OK" "$ARGUMENTS"
7478

7579
exit

0 commit comments

Comments
 (0)