Add automatic execution of cronjob through run script.

This commit is contained in:
2025-10-14 11:25:35 -07:00
parent 3fcd6af3a9
commit ed7c2b8b29

14
run.sh
View File

@@ -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