From b516d475d05fed7179683d174599c7133fffc45d Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 14 Aug 2018 05:34:15 -0400 Subject: [PATCH] Update announcer.j2 --- roles/openvpn/templates/announcer.j2 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/openvpn/templates/announcer.j2 b/roles/openvpn/templates/announcer.j2 index c8296562f..8580112f9 100755 --- a/roles/openvpn/templates/announcer.j2 +++ b/roles/openvpn/templates/announcer.j2 @@ -1,14 +1,14 @@ #!/bin/bash -x -# small daemon to identify this machine to the openvpn server +# Small daemon to identify this machine to the OpenVPN server HANDLE= UUID= if [ -f /etc/iiab/openvpn_handle ]; then - # Option #0: might source directly from /etc/iiab/local_vars.yml in future + # Option #0: Might source directly from /etc/iiab/local_vars.yml in future # Option #1 HANDLE=`cat /etc/iiab/openvpn_handle` else - # Option #2: dangerous to invoke hypothetical variables :( + # Option #2: Dangerous to invoke hypothetical variables :( source /etc/iiab/iiab.env # Option #3: CAUSED FAILURES IN AUGUST 2018, invoking stale variable from /etc/iiab/iiab.ini, but safer now that relegated to #3 ? if [ -z "$HANDLE" ]; then @@ -23,9 +23,10 @@ fi SERVER=/usr/bin/ncat ID=`printf "HANDLE = %s|UUID = %s" $HANDLE $UUID` +# August 2018: Removal of trailing slash tested on Raspbian, Ubuntu 18.04 & Ubuntu 16.04 #ID=`printf "HANDLE = %s|UUID = %s|" $HANDLE $UUID` -# start the daemon which will serve the handle on demand +# Start the daemon which will serve the handle on demand {% if is_debuntu %} $SERVER -l -k -p1705 --exec "/bin/echo $ID" & {% else %}