X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02.git/blobdiff_plain/78507dc2c597052cdb5eefcf365a9170842bc05c..a4c49e2a024f73000baf0228a2da8f68c4931e84:/exec/nfg_run_daily_jobs.sh?ds=inline diff --git a/exec/nfg_run_daily_jobs.sh b/exec/nfg_run_daily_jobs.sh index d1b036f..5ba3923 100755 --- a/exec/nfg_run_daily_jobs.sh +++ b/exec/nfg_run_daily_jobs.sh @@ -3,8 +3,10 @@ # Usage: nfg_run_daily_jobs.sh arg1 # Input: arg1: path to directory containing ninfacyzga-1 repository # Note: Run this script daily at midnight using `cron`. +# Depends: GNU Coreutils -nfg_base_dir="../"; +script_path="$(dirname "$(realpath -s "$0")")"; # Get script dir Ref/Attrib: https://stackoverflowcom/questions/4774054/ +nfg_base_dir="$script_path/../"; nfg_exec_dir="$nfg_base_dir"/exec; length_day_s=$((24 * 60 * 60)); # seconds @@ -21,6 +23,6 @@ try() { "$@" || die "cannot $*"; } # runs args as command, reports args if comma # Location # Photograph -photo_script_path="$nfg_exec_dir"/update_temp_photograph.sh; +photo_script_path="$nfg_exec_dir"/photograph/update_temp_photograph.sh; camera_name="DC1"; timeout "$length_day_s"s /bin/bash "$photo_script_path" "$camera_name" &