#!/bin/sh set -e ssh_host="admin@fg.dafu.dev" ssh_opts="-p 11422 -i /root/.ssh/id_ed25519" certname=fg.dafu.dev 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) . /root/repo/40scripts/util.sh fg_set_cert_script=" execute batch start config vpn certificate local edit ${certname} set private-key \"${key}\" set certificate \"${crt}\" end execute batch end " # execute batch lastlog run_ssh_script "${fg_set_cert_script}"