Skip to content

Commit 305bdc2

Browse files
Replaced "echo" with "sed" to avoid "Permission denied" in v-add-cron-restart-job (hestiacp#4818)
Replaced "echo" command with equivalent "sed" command as the "echo" resulted in "Permission denied".
1 parent fe31cb3 commit 305bdc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-add-cron-restart-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="v-update-sys-queue restart"
3434
check_cron=$(grep "$cmd" "/var/spool/cron/crontabs/hestiaweb" 2> /dev/null)
3535
if [ -z "$check_cron" ] && [ -n "$CRON_SYSTEM" ]; then
36-
echo "*/2 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue restart" >> "/var/spool/cron/crontabs/hestiaweb"
36+
sed -i -e "\$a*/2 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue restart" "/var/spool/cron/crontabs/hestiaweb"
3737
fi
3838

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

0 commit comments

Comments
 (0)