Browse Source

Replaced "echo" with "sed" to avoid "Permission denied" in v-add-cron-restart-job (#4818)

Replaced "echo" command with equivalent "sed" command as the "echo" resulted in "Permission denied".
fearworksmedia 1 year ago
parent
commit
305bdc2638
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-add-cron-restart-job

+ 1 - 1
bin/v-add-cron-restart-job

@@ -33,7 +33,7 @@ check_hestia_demo_mode
 cmd="v-update-sys-queue restart"
 check_cron=$(grep "$cmd" "/var/spool/cron/crontabs/hestiaweb" 2> /dev/null)
 if [ -z "$check_cron" ] && [ -n "$CRON_SYSTEM" ]; then
-	echo "*/2 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue restart" >> "/var/spool/cron/crontabs/hestiaweb"
+	sed -i -e "\$a*/2 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue restart" "/var/spool/cron/crontabs/hestiaweb"
 fi
 
 #----------------------------------------------------------#