From 6e3cb8152d1fbb3456cbb835a5e11c3a19c2d662 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Wed, 27 Mar 2024 13:29:04 -0700 Subject: [PATCH] rearrange commands and output verbiage, with extra echo line for readability --- install.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 9cc9b75..92a96bd 100755 --- a/install.sh +++ b/install.sh @@ -14,18 +14,20 @@ chmod 755 /usr/local/bin/dasel # one liner to automatically get latest version. could also be used to update existing install # curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o /usr/local/bin/dasel && chmod +x /usr/local/bin/dasel -if [[ ! -f /root/.pdns-credentials.ini ]]; then - echo "certbot_dns_powerdns:dns_powerdns_api_url =" > /root/.pdns-credentials.ini - echo "certbot_dns_powerdns:dns_powerdns_api_key =" >> /root/.pdns-credentials.ini - chmod 640 /root/.pdns-credentials.ini - echo "Update /root/.pdns-credentials.ini with your settings (this is to be used with certbot-dns-powerdns)." -fi - chmod 755 sbin/* cp sbin/* /usr/local/sbin/ +echo + if [[ ! -f /usr/local/etc/pdns.conf ]]; then cp etc/pdns.conf /usr/local/etc/pdns.conf chmod 640 /usr/local/etc/pdns.conf echo "Update /usr/local/etc/pdns.conf with your settings." fi + +if [[ ! -f /root/.pdns-credentials.ini ]]; then + echo "certbot_dns_powerdns:dns_powerdns_api_url =" > /root/.pdns-credentials.ini + echo "certbot_dns_powerdns:dns_powerdns_api_key =" >> /root/.pdns-credentials.ini + chmod 640 /root/.pdns-credentials.ini + echo "Update /root/.pdns-credentials.ini with your settings (this is to be used with certbot-dns-powerdns)." +fi