From 51b2ebf8e62634570af9e081247d0fd4189e730f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 14 Oct 2025 12:36:57 -0700 Subject: [PATCH] Do not do a full kill, allows website to keep uptime while getting updates. --- cronjob.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cronjob.sh b/cronjob.sh index 79c880f..05eee13 100755 --- a/cronjob.sh +++ b/cronjob.sh @@ -8,6 +8,14 @@ DIR="$(dirname -- "${BASH_SOURCE[0]}")" PROG="$(basename -- "${BASH_SOURCE[0]}")" echo "$DIR/$PROG" +function reload-project { + # Do not kill program, just use the new files and if run.sh or main.js were + # changed then they can get reloaded manually or by the nightly backup. + echo "Done!" + ## Kill node.js which will complete run.sh and restart any Docker containers. + #pkill node +} + echo "*** Running cronjob @ `date` ***" cd $DIR @@ -19,8 +27,7 @@ if [[ $status != 0 ]]; then echo "* Site is already up to date, exiting." exit 0 else - # Kill node.js which will complete run.sh and restart any Docker containers. - pkill node + reload-project fi exit 0