From a766572a2f810982d63f2f428d777e21d22cf7c2 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 9 Jun 2022 14:21:38 -0700 Subject: [PATCH 1/2] Set crons as app user for installer Signed-off-by: snipe --- snipeit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snipeit.sh b/snipeit.sh index 08c7c7b5f4..0bf253423c 100755 --- a/snipeit.sh +++ b/snipeit.sh @@ -237,7 +237,7 @@ install_snipeit () { log "php $APP_PATH/artisan migrate --force" echo "* Creating scheduler cron." - (crontab -l ; echo "* * * * * /usr/bin/php $APP_PATH/artisan schedule:run >> /dev/null 2>&1") | crontab - + (run_as_app_user crontab -l ; echo "* * * * * /usr/bin/php $APP_PATH/artisan schedule:run >> /dev/null 2>&1") | crontab - } set_firewall () { From 31e4d3b72539f04cf6953c5adf6bb76a6d69318d Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 9 Jun 2022 14:31:02 -0700 Subject: [PATCH 2/2] Added second run_as_app_user Signed-off-by: snipe --- snipeit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snipeit.sh b/snipeit.sh index 0bf253423c..ab190aac9c 100755 --- a/snipeit.sh +++ b/snipeit.sh @@ -237,7 +237,7 @@ install_snipeit () { log "php $APP_PATH/artisan migrate --force" echo "* Creating scheduler cron." - (run_as_app_user crontab -l ; echo "* * * * * /usr/bin/php $APP_PATH/artisan schedule:run >> /dev/null 2>&1") | crontab - + (run_as_app_user crontab -l ; echo "* * * * * /usr/bin/php $APP_PATH/artisan schedule:run >> /dev/null 2>&1") | run_as_app_user crontab - } set_firewall () {