From 0f037ec8a1ba48106cf5091487535393c3003982 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Mon, 10 Feb 2020 15:45:24 +0100 Subject: [PATCH] Add step to setup scheduler; starting from 10.8 Rebuild view cache post upgrade --- seqs/pixelfed.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/seqs/pixelfed.sh b/seqs/pixelfed.sh index a7f751c..329e082 100755 --- a/seqs/pixelfed.sh +++ b/seqs/pixelfed.sh @@ -91,7 +91,6 @@ step_7() { exe systemctl enable pixelfed.service exe service pixelfed start } - horizonServiceLoc="/etc/systemd/system/pixelfed.service" horizonService="\ [Unit] @@ -123,8 +122,16 @@ Environment= [Install] WantedBy=multi-user.target" -step_8_info() { echo "Nginx configuration"; } +step_8_info() { echo "Create scheduler cron job"; } +step_8_alias() { ALIAS="scheduler"; } step_8() { + addConf -s "$schedulerCmd" "$schedulerCron" +} +schedulerCron="/etc/cron.d/pixelfedScheduler" +schedulerCmd="* * * * * cd ${toolPath} && php artisan schedule:run >>/dev/null 2>&1" + +step_9_info() { echo "Nginx configuration"; } +step_9() { addConf -c "$nginxConfig" "$nginxConfigLoc" exe ln -s "$nginxConfigLoc" "$nginxConfigEnable" exe nginx -t @@ -238,6 +245,7 @@ step_101() { exe composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader exe php artisan config:cache exe php artisan route:cache + exe php artisan view:cache exe php artisan migrate --force exe php artisan horizon:purge exe php artisan storage:link