Style improvements

master
Keith Irwin 2022-09-10 10:45:51 -06:00
parent fb34998b5c
commit 33b9b97af1
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 8 additions and 6 deletions

View File

@ -123,11 +123,13 @@ wg_config="[Interface] # ${hostname}.${username}.${TLD}\nPrivateKey=${privkey}\n
<<<"${wg_config}" "${LIB_DIR}/http_res"
# Update nameserver
"${LIB_DIR}/ns_update_add" "${domain}" "${ipv4}" "${ipv6}" || (
printf 'ERROR! Failed to add %s %s %s to DNS server!\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
); printf 'Successfully added %s %s %s to DNS server.\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
if "${LIB_DIR}/ns_update_add" "${domain}" "${ipv4}" "${ipv6}"
then printf 'Successfully added %s %s %s to DNS server.\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
else printf 'ERROR! Failed to add %s %s %s to DNS server!\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
fi
# Create SSL cert
"${LIB_DIR}/ssl_peer_add" "${hostname}" "${username}" "IP:${ipv4},IP:${ipv6}" || (
printf 'ERROR! Failed to create certs for %s with IPS: %s %s!\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
); printf 'Successfully signed SSL certs for %s,%s,%s.\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
if "${LIB_DIR}/ssl_peer_add" "${hostname}" "${username}" "IP:${ipv4},IP:${ipv6}"
then printf 'Successfully signed SSL certs for %s,%s,%s.\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
else printf 'ERROR! Failed to create certs for %s with IPS: %s %s!\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
fi