Skip to content

Commit ecc2552

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#1745 from jaapmarcus/fix/helo-installer
Fix Delay creation of Help record
2 parents 8d82541 + 4adc8bd commit ecc2552

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

bin/v-change-sys-hostname

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

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

1819
# Includes
1920
# shellcheck source=/usr/local/hestia/func/main.sh
@@ -26,7 +27,7 @@ source $HESTIA/conf/hestia.conf
2627
# Verifications #
2728
#----------------------------------------------------------#
2829

29-
check_args '1' "$#" 'HOSTNAME'
30+
check_args '1' "$#" 'HOSTNAME [HELO]'
3031
is_format_valid 'domain'
3132

3233
# Perform verification if read-only mode is enabled
@@ -59,7 +60,7 @@ else
5960
fi
6061

6162
# Update ip helo for exim
62-
if [ ! -z "$MAIL_SYSTEM" ]; then
63+
if [[ ! -z "$MAIL_SYSTEM" && "$helo" == "yes" ]]; then
6364
pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
6465
$BIN/v-change-sys-ip-helo $pub_ip $domain
6566
fi

install/hst-install-debian.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ cp -rf $HESTIA_INSTALL_DIR/templates/web/skel/document_errors/* /var/www/documen
11771177
cp -rf $HESTIA_INSTALL_DIR/firewall $HESTIA/data/
11781178

11791179
# Configuring server hostname
1180-
$HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
1180+
$HESTIA/bin/v-change-sys-hostname $servername 'no' > /dev/null 2>&1
11811181

11821182
# Generating SSL certificate
11831183
echo "[ * ] Generating default self-signed SSL certificate..."
@@ -1711,6 +1711,7 @@ if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
17111711
fi
17121712

17131713
# Enable sftp jail
1714+
echo "[ * ] Enable SFTP jail..."
17141715
$HESTIA/bin/v-add-sys-sftp-jail > /dev/null 2>&1
17151716
check_result $? "can't enable sftp jail"
17161717

@@ -1730,6 +1731,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
17301731
fi
17311732

17321733
# Configuring system IPs
1734+
echo "[ * ] Configure System IP..."
17331735
$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
17341736

17351737
# Get main IP
@@ -1749,6 +1751,11 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
17491751
ip=$pub_ip
17501752
fi
17511753

1754+
if [ "$exim" = 'yes' ]; then
1755+
# Set HELO for IP as it didn't set during v-change-sys-hostname
1756+
$HESTIA/bin/v-change-sys-ip-helo $pub_ip $servername
1757+
fi
1758+
17521759
# Configuring libapache2-mod-remoteip
17531760
if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
17541761
cd /etc/apache2/mods-available
@@ -1836,6 +1843,8 @@ systemctl start hestia
18361843
check_result $? "hestia start failed"
18371844
chown admin:admin $HESTIA/data/sessions
18381845

1846+
# Create backup folder
1847+
mkdir -p /backup/
18391848

18401849
#----------------------------------------------------------#
18411850
# Configure File Manager #

install/hst-install-ubuntu.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ cp -rf $HESTIA_INSTALL_DIR/templates/web/skel/document_errors/* /var/www/documen
12061206
cp -rf $HESTIA_INSTALL_DIR/firewall $HESTIA/data/
12071207

12081208
# Configuring server hostname
1209-
$HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
1209+
$HESTIA/bin/v-change-sys-hostname $servername 'no' > /dev/null 2>&1
12101210

12111211
# Generating SSL certificate
12121212
echo "[ * ] Generating default self-signed SSL certificate..."
@@ -1732,10 +1732,12 @@ if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
17321732
fi
17331733

17341734
# Enable sftp jail
1735+
echo "[ * ] Enable SFTP jail..."
17351736
$HESTIA/bin/v-add-sys-sftp-jail > /dev/null 2>&1
17361737
check_result $? "can't enable sftp jail"
17371738

17381739
# Adding Hestia admin account
1740+
echo "[ * ] Create admin account..."
17391741
$HESTIA/bin/v-add-user admin $vpass $email default "System Administrator"
17401742
check_result $? "can't create admin user"
17411743
$HESTIA/bin/v-change-user-shell admin nologin
@@ -1755,6 +1757,7 @@ if [ "$iptables" = 'yes' ]; then
17551757
fi
17561758

17571759
# Get public IP
1760+
echo "[ * ] Configure System IP..."
17581761
pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
17591762
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
17601763
if [ -e /etc/rc.local ]; then
@@ -1776,6 +1779,11 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
17761779
ip=$pub_ip
17771780
fi
17781781

1782+
if [ "$exim" = 'yes' ]; then
1783+
# Set HELO for IP as it didn't set during v-change-sys-hostname
1784+
$HESTIA/bin/v-change-sys-ip-helo $pub_ip $servername
1785+
fi
1786+
17791787
# Configuring libapache2-mod-remoteip
17801788
if [ "$apache" = 'yes' ] && [ "$nginx" = 'yes' ] ; then
17811789
cd /etc/apache2/mods-available
@@ -1863,6 +1871,8 @@ systemctl start hestia
18631871
check_result $? "hestia start failed"
18641872
chown admin:admin $HESTIA/data/sessions
18651873

1874+
# Create backup folder
1875+
mkdir -p /backup/
18661876

18671877
#----------------------------------------------------------#
18681878
# Configure File Manager #

0 commit comments

Comments
 (0)