Fixed parsing

master
Keith Irwin 2022-11-06 18:21:24 -07:00
parent 8c7b6a2d7a
commit 46f9d963eb
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ ip="${1}"
qs="$(<<<"${2}" tr '&' '\n' | sed 's/?//')"
# Parse querystring
hostname="$(<<<"${qs}" grep -oP 'host=(.*)' | sed 's/^host//' | xargs)"
ext="$(<<<"${qs}" grep -oP 'ext=(.*)' | sed 's/^ext//' | xargs)"
hostname="$(<<<"${qs}" grep -oP 'host=(.*)' | sed 's/^host=//' | xargs)"
ext="$(<<<"${qs}" grep -oP 'ext=(.*)' | sed 's/^ext=//' | xargs)"
if ! file="${hostname:?}/server.${ext:?}"; then
printf 'ERROR! Hostname "%s" or extension "%s" or SSL_CONFIG_DIR "%s" missing!\n' "${hostname}" "${username}" "${ext}" "${SSL_CONFIG_DIR}" >>"${LOGFILE}"