Rename cronjob.sh to check_git.sh. Eventually do the same with the photo checker code so that it can be called from check_git.

This commit is contained in:
2025-10-14 15:13:24 -07:00
parent ccd4f4d051
commit 1cd182b3a9
2 changed files with 5 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ function kill-project {
function reload-project { function reload-project {
# Not much to do, run.sh and main.js automatically uses the latest files. # Not much to do, run.sh and main.js automatically uses the latest files.
rm -v files/photos/index.html rm -v files/photos/index.html
# TBD/TODO: Call check_photos.sh once it has been pulled from run.sh.
log "Project reloaded successfully!" log "Project reloaded successfully!"
} }

7
run.sh
View File

@@ -123,6 +123,7 @@ log "Removing old index files."
find files/photos/ -name "*".html -print -delete find files/photos/ -name "*".html -print -delete
{ {
check_main photos check_main photos
# TBD/TODO: Move this section to check_photos.sh similar to check_git.sh.
count=1 count=1
http_code=0 http_code=0
port="${ports%% *}" port="${ports%% *}"
@@ -148,10 +149,10 @@ find files/photos/ -name "*".html -print -delete
## Main ## ## Main ##
log "Start local cronjob." log "Start check_git."
while true; do while true; do
check_main cronjob check_main check_git
$DIR/cronjob.sh $DIR/check_git.sh
sleep 30 sleep 30
done & done &