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.4.0"; # Define version of script.
+SCRIPT_VERSION="0.4.1"; # 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)
# MAIN LOOP:Record gps data until script lifespan ends
while [[ "$SECONDS" -lt "$SCRIPT_TTL" ]]; do
+ magicParseRecipientDir
magicGatherWriteBuffer &
sleep "$BUFFER_TTL";
done
encrypted and compressed data to a tar file for later extraction
(possibly the same script with future features) would be best.
+** TODO: Place persistent recip. updates in asynchronous coproc
+2020-07-06T19:37Z; bktei> In order to update the recipient list, the
+magicParseRecipientDir() function needs to be run each buffer period
+in order to scan for changes in the recipient list. However, such a
+scan takes time; if the magicGatherWriteBuffer() function must pause
+until magicParseRecipientDir() completes, then a significant pause
+between buffer sessions may occur, causing detectable gaps in location
+data between buffer rounds.
+
+I looked for ways in which I might start magicParseRecipientDir()
+asynchronously immediately before running the data collection command
+and then collect its output at the start of the next buffer round. One
+way using the ~coproc~ Bash built-in is described [[https://stackoverflow.com/a/20018504/10850071][here]]. I'd have to
+make the asynchronous function output the recipient list to stdout
+which would then be ~read~ into the ~recPubKeysValid~ array in the
+main loop. However, for now, I'm putting the magicParseRecipientDir()
+as-is in the main loop and accepting the delay for now.
* bkgpslog narrative
** Initialize environment
*** Init variables