From 0907f54e81a18137c9732dfc986cf81ddf53f60d Mon Sep 17 00:00:00 2001 From: Steve Magnuson Date: Tue, 14 Jul 2020 19:53:38 -0700 Subject: [PATCH] Fixed bug in dw_aprs_gui.sh that prevented script from restarting --- dw_aprs_gui.sh | 24 +++++++++++++++--------- hampi-utilities.version | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/dw_aprs_gui.sh b/dw_aprs_gui.sh index 2a66248..c7e1bc0 100755 --- a/dw_aprs_gui.sh +++ b/dw_aprs_gui.sh @@ -16,7 +16,7 @@ #% #================================================================ #- IMPLEMENTATION -#- version ${SCRIPT_NAME} 1.0.1 +#- version ${SCRIPT_NAME} 1.0.3 #- author Steve Magnuson, AG7GN #- license CC-BY-SA Creative Commons License #- script_id 0 @@ -350,10 +350,6 @@ CONFIG_TAB_TEXT="Direwolf APRS Configuration\n \ ID="${RANDOM}" RETURN_CODE=0 -# Have direwolf allocate a pty -#DIREWOLF="$(command -v direwolf) -p -t 0 -d u" -# No pty -DIREWOLF="$(command -v direwolf) -t 0 -d u" PIPE=$TMPDIR/pipe mkfifo $PIPE @@ -473,23 +469,33 @@ $SYNTAX && set -n # Run in debug mode, if set $DEBUG && set -x -timeStamp & -timeStamp_PID=$! - +timeStamp_PID="" direwolf_PID="" YAD_PIDs=() while true do + + # Have direwolf allocate a pty + #DIREWOLF="$(command -v direwolf) -p -t 0 -d u" + # No pty + DIREWOLF="$(command -v direwolf) -t 0 -d u" + # Kill any running processes and load latest settings killDirewolf $direwolf_PID - for P in ${YAD_PIDs[@]} + for P in ${YAD_PIDs[@]} $timeStamp_PID do ps x | egrep -q "^$P" && kill $P done rm -f $TMPDIR/CONFIGURE_APRS.txt + + # Retrieve saved settings or defaults if there are no saved settings loadSettings $CONFIG_FILE YAD_PIDs=() + + # Start the Time Stamper function + timeStamp & + timeStamp_PID=$! # Start the monitor tab [[ $FIRST_RUN == true ]] && MODE_MESSAGE="" || MODE_MESSAGE="${F[_APRSMODE_]}" diff --git a/hampi-utilities.version b/hampi-utilities.version index 0c50b92..f886852 100644 --- a/hampi-utilities.version +++ b/hampi-utilities.version @@ -1 +1 @@ -VERSION="2.3.3" \ No newline at end of file +VERSION="2.3.4" \ No newline at end of file