summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
Diffstat (limited to 'custom')
-rw-r--r--custom/simp_le.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/custom/simp_le.nix b/custom/simp_le.nix
index 4caf50ce..30341179 100644
--- a/custom/simp_le.nix
+++ b/custom/simp_le.nix
@@ -8,8 +8,14 @@ domain:
8 8
9let 9let
10 script = writeText "${domain}.sh" '' 10 script = writeText "${domain}.sh" ''
11 #!${bash}/bin/bash
12
11 mkdir -p ${dir} 13 mkdir -p ${dir}
12 cd ${dir} 14 cd ${dir}
15 mkdir -p /root/ssl_archive/$(date +'%Y-%m-%d')-${domain}
16 for f in account_key.json cert.pem fullchain.pem key.pem privkey.pem; do
17 [[ -e $f ]] && mv $f /root/ssl_archive/$(date +'%Y-%m-%d')-${domain}
18 done
13 ${simp_le}/bin/simp_le -d ${domain}:/srv/www/acme/${domain}/ \ 19 ${simp_le}/bin/simp_le -d ${domain}:/srv/www/acme/${domain}/ \
14 --email "phikeebaogobaegh@141.li" \ 20 --email "phikeebaogobaegh@141.li" \
15 -f account_key.json \ 21 -f account_key.json \
@@ -19,4 +25,4 @@ let
19 [[ -e key.pem ]] && ln -s -f key.pem privkey.pem 25 [[ -e key.pem ]] && ln -s -f key.pem privkey.pem
20 ''; 26 '';
21in 27in
22 "${bash}/bin/bash ${script} 2>&1 | ${eject}/bin/logger -p auth.info" 28 "${script} 2>&1 | ${eject}/bin/logger -p auth.info"