Skip to content

Commit 77a09a1

Browse files
committed
Check if /etc/rc.local exists before running sed.
Closes hestiacp#667
1 parent 0f5963e commit 77a09a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ if [ "$named" = 'yes' ]; then
13771377
check_result $? "bind9 start failed"
13781378

13791379
# Workaround for OpenVZ/Virtuozzo
1380-
if [ -e "/proc/vz/veinfo" ]; then
1380+
if [ -e "/proc/vz/veinfo" ] && [ -e "/etc/rc.local" ]; then
13811381
sed -i "s/^exit 0/service bind9 restart\nexit 0/" /etc/rc.local
13821382
fi
13831383
fi

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ if [ "$named" = 'yes' ]; then
13541354
check_result $? "bind9 start failed"
13551355

13561356
# Workaround for OpenVZ/Virtuozzo
1357-
if [ -e "/proc/vz/veinfo" ]; then
1357+
if [ -e "/proc/vz/veinfo" ] && [ -e "/etc/rc.local" ]; then
13581358
sed -i "s/^exit 0/service bind9 restart\nexit 0/" /etc/rc.local
13591359
fi
13601360
fi

0 commit comments

Comments
 (0)