add x mod, cleanup cert script

This commit is contained in:
daniel fusser 2023-03-14 01:09:32 +01:00
parent f99e053b41
commit 48e6a13ba9
5 changed files with 4 additions and 3 deletions

0
42git.sh Normal file → Executable file
View File

0
cert2-40_api.sh Normal file → Executable file
View File

7
certs2-40.sh Normal file → Executable file
View File

@ -1,13 +1,14 @@
#!/bin/sh #!/bin/sh
set -e set -e
ssh_host="fg" ssh_host="admin@fg.dafu.dev"
ssh_opts="-p 11422 -i /root/.ssh/id_ed25519"
certname=fg.dafu.dev certname=fg.dafu.dev
key=$(cat /mnt/docker/volumes/caddy_caddy_data/_data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/${certname}/${certname}.key) key=$(cat /mnt/docker/volumes/caddy_caddy_data/_data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/${certname}/${certname}.key)
crt=$(cat /mnt/docker/volumes/caddy_caddy_data/_data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/${certname}/${certname}.crt) crt=$(cat /mnt/docker/volumes/caddy_caddy_data/_data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/${certname}/${certname}.crt)
run_ssh_script() { printf "%s" "${1}" | ssh $ssh_host; } . /root/repo/40scripts/util.sh
fg_set_cert_script=" fg_set_cert_script="
execute batch start execute batch start
@ -17,7 +18,7 @@ set private-key \"${key}\"
set certificate \"${crt}\" set certificate \"${crt}\"
end end
execute batch end execute batch end
execute batch lastlog
" "
# execute batch lastlog
run_ssh_script "${fg_set_cert_script}" run_ssh_script "${fg_set_cert_script}"

0
sshkey_2-40.sh Normal file → Executable file
View File

0
util.sh Normal file → Executable file
View File