From a84176cf53467f27e05d5d878cb8971fe12c1708 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Sun, 16 Jul 2023 01:20:56 -0700 Subject: [PATCH] fixed scripting in sp.sh --- for_new_sovran_pros/sp.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/for_new_sovran_pros/sp.sh b/for_new_sovran_pros/sp.sh index 726c351..f864a55 100644 --- a/for_new_sovran_pros/sp.sh +++ b/for_new_sovran_pros/sp.sh @@ -65,7 +65,7 @@ echo -n $REPLY > /var/lib/domains/sslemail mkdir /var/lib/nextcloudaddition -cat <> /var/lib/nextcloudaddition/nextcloudaddition +cat > /var/lib/nextcloudaddition/nextcloudaddition <<- "EOF" 'trusted_proxies' => array ( @@ -76,49 +76,53 @@ cat <> /var/lib/nextcloudaddition/nextcloudaddition 'filelocking.enabled' => true, 'memcache.local' => '\OC\Memcache\APCu', -EOT +EOF # mkdir /var/lib/njalla/ -cat <> /var/lib/njalla/njalla.sh +cat > /var/lib/njalla/njalla.sh <<- "EOF" #!/usr/bin/env bash -# IP=$(wget -qO- https://ipecho.net/plain ; echo) +IP=$(wget -qO- https://ipecho.net/plain ; echo) ## Manually Add DDNS Script From Njalla User Account AFTER Install -#curl "https://...${IP}" +curl "https://...${IP}" - -EOT +EOF # mkdir /var/lib/external_ip -cat <> /var/lib/external_ip/external_ip.sh +cat > /var/lib/external_ip/external_ip.sh <<- "EOF" #!/usr/bin/env bash -wget -qO- https://ipecho.net/plain ; echo > /var/lib/secrets/external_ip +IP=$(wget -qO- https://ipecho.net/plain ; echo) + +echo "${IP}" > /var/lib/secrets/external_ip + +EOF + -EOT # mkdir /var/lib/agenix-secrets/ -cat <> /var/lib/agenix-secrets/secrets.nix +cat > /var/lib/agenix-secrets/secrets.nix <<- "EOF" let root = "placeholder" ; in + { "wordpressdb.age".publicKeys = [ root ]; @@ -133,8 +137,7 @@ in } - -EOT +EOF #