Fixed parsing
parent
8c7b6a2d7a
commit
46f9d963eb
|
@ -27,8 +27,8 @@ ip="${1}"
|
||||||
qs="$(<<<"${2}" tr '&' '\n' | sed 's/?//')"
|
qs="$(<<<"${2}" tr '&' '\n' | sed 's/?//')"
|
||||||
|
|
||||||
# Parse querystring
|
# Parse querystring
|
||||||
hostname="$(<<<"${qs}" grep -oP 'host=(.*)' | sed 's/^host//' | xargs)"
|
hostname="$(<<<"${qs}" grep -oP 'host=(.*)' | sed 's/^host=//' | xargs)"
|
||||||
ext="$(<<<"${qs}" grep -oP 'ext=(.*)' | sed 's/^ext//' | xargs)"
|
ext="$(<<<"${qs}" grep -oP 'ext=(.*)' | sed 's/^ext=//' | xargs)"
|
||||||
|
|
||||||
if ! file="${hostname:?}/server.${ext:?}"; then
|
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}"
|
printf 'ERROR! Hostname "%s" or extension "%s" or SSL_CONFIG_DIR "%s" missing!\n' "${hostname}" "${username}" "${ext}" "${SSL_CONFIG_DIR}" >>"${LOGFILE}"
|
||||||
|
|
Loading…
Reference in New Issue