1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Update announcer.j2

This commit is contained in:
A Holt 2018-08-15 14:20:11 -04:00 committed by GitHub
parent 6b67d9e35f
commit 609ed5b109
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,17 +4,19 @@
HANDLE= HANDLE=
UUID= UUID=
if [ -f /etc/iiab/openvpn_handle ]; then if [ -f /etc/iiab/openvpn_handle ]; then
# Option #0: Might source directly from /etc/iiab/local_vars.yml in future # Option #0: Source directly from /etc/iiab/local_vars.yml in future?
# Option #1 # Option #1
HANDLE=`cat /etc/iiab/openvpn_handle` HANDLE=`cat /etc/iiab/openvpn_handle`
else # Option #2: UUID is later used, if openvpn_handle is not set
# Option #2: Dangerous to invoke hypothetical variables :( # Sourcing a variable from ~4 different places is a recipe for total confusion (or worse!)
source /etc/iiab/iiab.env #else
# Option #3: CAUSED FAILURES IN AUGUST 2018, invoking stale variable from /etc/iiab/iiab.ini, but safer now that relegated to #3 ? # # Option #3: Dangerous to invoke hypothetical variables :(
if [ -z "$HANDLE" ]; then # source /etc/iiab/iiab.env
HANDLE=`cat /etc/iiab/iiab.ini | gawk \ # # Option #4: CAUSED FAILURES IN AUGUST 2018, invoking stale variable from /etc/iiab/iiab.ini, but safer now that relegated to #4 ?
'{ if((toupper($1) == "HANDLE") && ($2 == "=")) { print $3;}}'` # if [ -z "$HANDLE" ]; then
fi # HANDLE=`cat /etc/iiab/iiab.ini | gawk \
# '{ if((toupper($1) == "HANDLE") && ($2 == "=")) { print $3;}}'`
# fi
fi fi
HANDLE=${HANDLE// /_} HANDLE=${HANDLE// /_}
if [ -f /etc/iiab/uuid ]; then if [ -f /etc/iiab/uuid ]; then