diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-24 12:45:09 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-24 12:45:09 +0100 |
commit | a2b53ca94318207687dabc033e6b346088711d25 (patch) | |
tree | 484aa22fa279e63bef81083d25cb3df006cc297c | |
parent | cd2886462a8a079bebf47e25847f8dcdfa157d3e (diff) | |
download | nixos-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.nix | 8 |
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 | ||
9 | let | 9 | let |
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 | ''; |
21 | in | 27 | in |
22 | "${bash}/bin/bash ${script} 2>&1 | ${eject}/bin/logger -p auth.info" | 28 | "${script} 2>&1 | ${eject}/bin/logger -p auth.info" |