diff --git a/renderer/_example.sh b/renderer/_example.sh index d54e224..08e5c68 100755 --- a/renderer/_example.sh +++ b/renderer/_example.sh @@ -19,7 +19,7 @@ else touch "${LOCKFILE}" # Ensure the lock file is removed when we exit and when we receive signals - trap "rm -f '${LOCKFILE}'; trap - SIGTERM && kill -- -'$$'" SIGINT SIGTERM EXIT + trap 'rm -f ${LOCKFILE}; trap - SIGTERM && kill -- -$$' SIGINT SIGTERM EXIT fi # The local path to the tileservice repo diff --git a/renderer/render_seashells.sh b/renderer/render_seashells.sh index 054b5d9..b42e808 100755 --- a/renderer/render_seashells.sh +++ b/renderer/render_seashells.sh @@ -33,10 +33,9 @@ PLANET="$WORKING_DIR/data/planet.pmtiles" run() { TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S") START_TIME=$(date +%s) - "$DIR/render_once.sh" "$WORKING_DIR" - # Check the exit status of render_once.sh - if [ $? -eq 0 ]; then + if "$DIR/render_once.sh" "$WORKING_DIR" + then # Record the end time END_TIME=$(date +%s)