add x mod, cleanup cert script
This commit is contained in:
parent
f99e053b41
commit
48e6a13ba9
0
cert2-40_api.sh
Normal file → Executable file
0
cert2-40_api.sh
Normal file → Executable file
7
certs2-40.sh
Normal file → Executable file
7
certs2-40.sh
Normal file → Executable 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
0
sshkey_2-40.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user