Skip to content

Commit 7414103

Browse files
author
Kristan Kenney
committed
Ensure public IP is set correctly on boot via rc.local on Ubuntu 16.04
Command was being placed after exit 0 in certain cases.
1 parent f3430a0 commit 7414103

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,9 @@ fi
16081608
# Get public IP
16091609
pub_ip=$(curl --ipv4 -s https://ip.hestiacp.com/)
16101610
if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
1611+
sed -i '/exit 0/d' /etc/rc.local
16111612
echo "$HESTIA/bin/v-update-sys-ip" >> /etc/rc.local
1613+
echo "exit 0" >> /etc/rc.local
16121614
$HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip > /dev/null 2>&1
16131615
ip=$pub_ip
16141616
fi

0 commit comments

Comments
 (0)