Try to preserve newlines

master
Keith Irwin 2022-11-07 17:24:55 -07:00
parent d6a418f963
commit c09d66c796
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
3 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ fi
# Do the wireguard and tell the user
server_blocks=''
while IFS=$'\t' read -r server_hostname server_ipv4 server_ipv6 server_pubkey server_endpoint; do
while IFS=$'\t' read -r server_hostname server_ipv4 server_ipv6 server_pubkey server_endpoint server_url server_secret; do
[[ ${server_hostname:0:1} = \# ]] && continue
server_psk="$(/usr/bin/wg genpsk)"
server_blocks="${server_blocks}\n[Peer] # ${server_hostname}.${TLD}\nPublicKey=${server_pubkey}\nPresharedKey=${server_psk}\nAllowedIPs=${server_ipv4}/32,${server_ipv6}/128\nEndpoint=${server_endpoint}\n"

View File

@ -127,7 +127,7 @@ fi
# Do the wireguard and tell the user
server_blocks=''
while IFS=$'\t' read -r server_hostname server_ipv4 server_ipv6 server_pubkey server_endpoint; do
while IFS=$'\t' read -r server_hostname server_ipv4 server_ipv6 server_pubkey server_endpoint server_url server_secret; do
[[ ${server_hostname:0:1} = \# ]] && continue
server_psk="$(/usr/bin/wg genpsk)"
server_blocks="${server_blocks}\n[Peer] # ${server_hostname}.${TLD}\nPublicKey=${server_pubkey}\nPresharedKey=${server_psk}\nAllowedIPs=${server_ipv4}/32,${server_ipv6}/128\nEndpoint=${server_endpoint}\n"

View File

@ -28,4 +28,4 @@ elif [ "${2}" == '' ]
fi
# Send response
printf '%s%sDate: %s\n\n%s\n' "${status}" "${content_type}" "$(date)" "${body}"
printf "%s%sDate: %s\n\n%s\n" "${status}" "${content_type}" "$(date)" "${body}"