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

Explain var(s) set to "" when file(s) don't exist. So ' || true' is not nec.

This commit is contained in:
A Holt 2020-11-23 02:54:46 -05:00 committed by GitHub
parent 5c2c13966a
commit 998b147e08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
#if [ -f /etc/iiab/openvpn_handle ]; then
# Option #1: Source directly from /etc/iiab/local_vars.yml in future?
# Option #2
HANDLE=$(cat /etc/iiab/openvpn_handle) # Set to "" if file doesn't exist
HANDLE=$(cat /etc/iiab/openvpn_handle) # Sets to "" if file doesn't exist (error is ok!)
# Sourcing a variable from ~4 different places is a recipe for total confusion
# (or worse!) Far better to make variable openvpn_handle and file
@ -28,7 +28,7 @@
#fi
HANDLE=${HANDLE// /_}
#if [ -f /etc/iiab/uuid ]; then
UUID=$(cat /etc/iiab/uuid) # Set to "" if file doesn't exist
UUID=$(cat /etc/iiab/uuid) # Sets to "" if file doesn't exist (error is ok!)
#fi
SERVER=/usr/bin/ncat