summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-24 12:45:09 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-24 12:45:09 +0100
commita2b53ca94318207687dabc033e6b346088711d25 (patch)
tree484aa22fa279e63bef81083d25cb3df006cc297c
parentcd2886462a8a079bebf47e25847f8dcdfa157d3e (diff)
downloadnixos-a2b53ca94318207687dabc033e6b346088711d25.tar
nixos-a2b53ca94318207687dabc033e6b346088711d25.tar.gz
nixos-a2b53ca94318207687dabc033e6b346088711d25.tar.bz2
nixos-a2b53ca94318207687dabc033e6b346088711d25.tar.xz
nixos-a2b53ca94318207687dabc033e6b346088711d25.zip
old cert backups
-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"