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

openvpn/templates/announcer: User education re: spaces-to-underscores

This commit is contained in:
A Holt 2021-08-19 18:14:29 -04:00 committed by GitHub
parent b8a9ec0914
commit 201a8cd00c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
# Empty string, worst case, e.g. whether var is set to "" (or not set at all!)
HANDLE=$(grep "^openvpn_handle:\s" /etc/iiab/local_vars.yml | tail -1 | sed "s/^openvpn_handle:\s\+//; s/#.*//; s/\s*$//; s/^\(['\"]\)\(.*\)\1$/\2/")
# Change all spaces to underscores - same as "s/ /_/g"
# Change all spaces to underscores -- same as "s/ /_/g" -- /usr/bin/iiab-support emulates this, to help folks understand
HANDLE=${HANDLE// /_}
# Likewise empty string is the worst case, e.g. if file doesn't exist.