From ed7c2b8b297d7228e80c156443a827f2dceb2bf1 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 14 Oct 2025 11:25:35 -0700 Subject: [PATCH] Add automatic execution of cronjob through run script. --- run.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index e3a29c9..caf873f 100755 --- a/run.sh +++ b/run.sh @@ -4,8 +4,9 @@ ## Setup ## -DIR=`dirname $0` -PROG=`basename $0` +DIR="$(dirname -- "${BASH_SOURCE[0]}")" +PROG="$(basename -- "${BASH_SOURCE[0]}")" +echo "$DIR/$PROG" ## Functions ## @@ -120,11 +121,20 @@ find files/photos/ -name "*".html -print -delete ## Main ## +log "Start repo updater" +while true; do + $DIR/cronjob.sh + sleep 30 +done & + log "Start website API." node ./main.js $ports status=$? ## Finish ## +log "Kill spawned processes." +pkill -P $$ + log "Exiting with status '$status'." exit $status