Skip to content

Commit a61712d

Browse files
Replaced "echo" with "sed" to avoid "Permission denied" in v-add-remote-dns-host (hestiacp#4817)
Replaced "echo" command with equivalent "sed" command as the "echo" resulted in "Permission denied", preventing automatic updates from being resumed/enabled. Also observed that the "echo" command would have overwritten the entire crontab file anyway (used > where it should have used >>).
1 parent 6ede0b4 commit a61712d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-add-remote-dns-host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
127127
day='*'
128128
month='*'
129129
wday='*'
130-
echo "$min $hour * * * sudo /usr/local/hestia/bin/$cmd" > "/var/spool/cron/crontabs/hestiaweb"
130+
sed -i -e "\$a$min $hour * * * sudo /usr/local/hestia/bin/$cmd" "/var/spool/cron/crontabs/hestiaweb"
131131
fi
132132

133133
# Logging

0 commit comments

Comments
 (0)