X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02.git/blobdiff_plain/e56d6109401b4760bb51f8d0dd8ee46f364ed4ab..ecd8444a37b66dbbefd21926162789a707e9ff66:/exec/bkgpslog diff --git a/exec/bkgpslog b/exec/bkgpslog index ba66b79..0309059 100755 --- a/exec/bkgpslog +++ b/exec/bkgpslog @@ -1,8 +1,5 @@ #!/bin/bash - -# Desc: Records gps data until midnight -# Author: Steven Baltakatei Sandoval; License: GPLv3+ -# Usage: bkgpslog -o [output dir] +# Desc: Records gps data #==BEGIN Define script parameters== ## Logging Behavior parameters @@ -14,7 +11,7 @@ DIR_TMP_DEFAULT="/dev/shm"; # Default parent of working directory SCRIPT_TIME_START=$(date +%Y%m%dT%H%M%S.%N); PATH="$HOME/.local/bin:$PATH"; # Add "$(systemd-path user-binaries)" path in case apps saved there SCRIPT_HOSTNAME=$(hostname); # Save hostname of system running this script. -SCRIPT_VERSION="0.5.6"; # Define version of script. +SCRIPT_VERSION="0.5.7"; # Define version of script. SCRIPT_NAME="bkgpslog"; # Define basename of script file. SCRIPT_URL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script. AGE_VERSION="1.0.0-beta2"; # Define version of age (encryption program) @@ -1319,7 +1316,7 @@ main() { bufferTTL_STR="$(timeDuration "$BUFFER_TTL")"; # Init temp working dir - try mkdir "$DIR_TMP" && vbm "DEBUG:Working dir creatd at:$DIR_TMP"; + try mkdir "$DIR_TMP" && chmod +t "$DIR_TMP" && vbm "DEBUG:Working dir creatd at:$DIR_TMP"; # Initialize 'tar' archive ## Define output tar path (note: each day gets *one* tar file (Ex: "20200731..hostname_location.[.gpx.gz].tar")) @@ -1347,7 +1344,7 @@ main() { # Cleanup ## Remove DIR_TMP - try rm -r "$DIR_TMP"; + try rm -r "$DIR_TMP" && vbm "Removed DIR_TMP:$DIR_TMP"; vbm "STATUS:Main function finished."; } # Main function. @@ -1359,3 +1356,6 @@ main() { main "$@" # Run main function. exit 0; #==END Perform work and exit== + +# Author: Steven Baltakatei Sandoval; +# License: GPLv3+