diff options
author | Erich Eckner <git@eckner.net> | 2019-12-12 11:30:00 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-12-12 11:30:00 +0100 |
commit | 4bf8c26765ee5b14284aa94814ac31c4a5130723 (patch) | |
tree | 4033785752db06db5d3c19ffc272d50ebf854c42 | |
parent | ae27e51a3e89f1519b25da031c9f22cc66acc453 (diff) | |
download | simple-pki-4bf8c26765ee5b14284aa94814ac31c4a5130723.tar.xz |
sign-ca.in: mostly revert 96826744, it was right(er) before
-rwxr-xr-x | sign-ca.in | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -33,15 +33,15 @@ move_old_ca() { } level_ground_for_new_ca() { - install -d -m0755 '#ETCDIR#/'"$1"'/ca/'"$1"'/db' - install -d -m0700 '#ETCDIR#/'"$1"'/ca/'"$1"'/private' + install -d -m0755 '#ETCDIR#/simple-pki/ca/'"$1"'/db' + install -d -m0700 '#ETCDIR#/simple-pki/ca/'"$1"'/private' touch \ - '#ETCDIR#/'"$1"'/ca/'"$1"'/db/'"$1"'.db' \ - '#ETCDIR#/'"$1"'/ca/'"$1"'/db/'"$1"'.db.attr' + '#ETCDIR#/simple-pki/ca/'"$1"'/db/'"$1"'.db' \ + '#ETCDIR#/simple-pki/ca/'"$1"'/db/'"$1"'.db.attr' for srl in 'crl' 'crt'; do - old='#ETCDIR#/'"$1"'.old/ca/'"$1"'/db/'"$1"'.old.'"${srl}"'.srl' - new='#ETCDIR#/'"$1"'/ca/'"$1"'/db/'"$1"'.'"${srl}"'.srl' - if [ ! -f "${old}" ]; then + old='#ETCDIR#/simple-pki/ca/'"$1"'.old/db/'"$1"'.old.'"${srl}"'.srl' + new='#ETCDIR#/simple-pki/ca/'"$1"'/db/'"$1"'.'"${srl}"'.srl' + if [ -f "${old}" ]; then cp "${old}" "${new}" else echo '01' \ |