Skip to content

Commit 0ffe68a

Browse files
author
Kristan Kenney
committed
Fix check for rc.local in Ubuntu installer
1 parent a65bc29 commit 0ffe68a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/hst-install-ubuntu.sh

Lines changed: 3 additions & 1 deletion
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
1611+
if [ -e /etc/rc.local ]; then
1612+
sed -i '/exit 0/d' /etc/rc.local
1613+
fi
16121614
echo "$HESTIA/bin/v-update-sys-ip" >> /etc/rc.local
16131615
echo "exit 0" >> /etc/rc.local
16141616
$HESTIA/bin/v-change-sys-ip-nat $ip $pub_ip > /dev/null 2>&1

0 commit comments

Comments
 (0)