Style improvements
parent
fb34998b5c
commit
33b9b97af1
|
@ -123,11 +123,13 @@ wg_config="[Interface] # ${hostname}.${username}.${TLD}\nPrivateKey=${privkey}\n
|
||||||
<<<"${wg_config}" "${LIB_DIR}/http_res"
|
<<<"${wg_config}" "${LIB_DIR}/http_res"
|
||||||
|
|
||||||
# Update nameserver
|
# Update nameserver
|
||||||
"${LIB_DIR}/ns_update_add" "${domain}" "${ipv4}" "${ipv6}" || (
|
if "${LIB_DIR}/ns_update_add" "${domain}" "${ipv4}" "${ipv6}"
|
||||||
printf 'ERROR! Failed to add %s %s %s to DNS server!\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
|
then printf 'Successfully added %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}"
|
else printf 'ERROR! Failed to add %s %s %s to DNS server!\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create SSL cert
|
# Create SSL cert
|
||||||
"${LIB_DIR}/ssl_peer_add" "${hostname}" "${username}" "IP:${ipv4},IP:${ipv6}" || (
|
if "${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}"
|
then printf 'Successfully signed SSL certs for %s,%s,%s.\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}"
|
||||||
); 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
|
||||||
|
|
Loading…
Reference in New Issue