Skip to content

Commit 123996d

Browse files
Replaced "echo" with "sed" to avoid "Permission denied" in v-add-cron-hestia-autoupdate (hestiacp#4816)
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 a61712d commit 123996d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-add-cron-hestia-autoupdate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if [ "$mode" = "git" ]; then
6262
command='v-update-sys-hestia-git'
6363
fi
6464

65-
echo "$min $hour * * * sudo /usr/local/hestia/bin/$command" > "/var/spool/cron/crontabs/hestiaweb"
65+
sed -i -e "\$a$min $hour * * * sudo /usr/local/hestia/bin/$command" "/var/spool/cron/crontabs/hestiaweb"
6666

6767
#----------------------------------------------------------#
6868
# Hestia #

0 commit comments

Comments
 (0)