Skip to content

Commit 6ede0b4

Browse files
Replaced "echo" with "sed" to avoid "Permission denied" in v-add-cron-letsencrypt-job (hestiacp#4819)
Replaced "echo" command with equivalent "sed" command as the "echo" resulted in "Permission denied". From what I can tell, this file is no longer used anywhere, but it has previously been updated to use the new "hestiaweb" user, so for completeness, I believe it should be updated to correctly update the crontab file as well, instead of erroring with "Permission denied".
1 parent 305bdc2 commit 6ede0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-add-cron-letsencrypt-job

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ check_hestia_demo_mode
3333
cmd="bin/v-update-sys-queue letsencrypt"
3434
check_cron=$(grep "$cmd" "/var/spool/cron/crontabs/hestiaweb" 2> /dev/null)
3535
if [ -z "$check_cron" ] && [ -n "$CRON_SYSTEM" ]; then
36-
echo "*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue letsencrypt" >> "/var/spool/cron/crontabs/hestiaweb"
36+
sed -i -e "\$a*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue letsencrypt" "/var/spool/cron/crontabs/hestiaweb"
3737
fi
3838

3939
#----------------------------------------------------------#

0 commit comments

Comments
 (0)