diff options
author | Maxim Devaev <[email protected]> | 2022-06-26 15:42:57 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-06-26 15:42:57 +0300 |
commit | 329b84e124fa70a0c70f82867b63e66dcf3c5847 (patch) | |
tree | a9f8bcfb296a6df910e7dab5b5158ca82200a59a /scripts/kvmd-certbot | |
parent | fd70e8203c731e9794d46a6d7d75f9c4972358ea (diff) |
fix
Diffstat (limited to 'scripts/kvmd-certbot')
-rwxr-xr-x | scripts/kvmd-certbot | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/kvmd-certbot b/scripts/kvmd-certbot index 8cdc1f10..fa097e0f 100755 --- a/scripts/kvmd-certbot +++ b/scripts/kvmd-certbot @@ -73,9 +73,17 @@ function restart_if_running_vnc() { case "$1" in -h|--help|help) + create_tmp sudo -u "$user" certbot "$@" "${cur_opts[@]}" ;; + --) + shift + create_tmp + ensure_runroot + sudo -u "$user" kvmd-pstrun -- certbot "$@" "${cur_opts[@]}" + ;; + certonly|certonly_webroot) webroot_opts=() if [ "$1" == certonly_webroot ]; then @@ -129,19 +137,13 @@ case "$1" in echo "Usage: kvmd-certbot $1 <domain>" exit 1 fi + set -x rm -f "/etc/kvmd/$target/ssl/server."{crt,key} ln -s "$cur/config/live/$2/fullchain.pem" "/etc/kvmd/$target/ssl/server.crt" ln -s "$cur/config/live/$2/privkey.pem" "/etc/kvmd/$target/ssl/server.key" "restart_if_running_$target" ;; - --) - shift - create_tmp - ensure_runroot - sudo -u "$user" kvmd-pstrun -- certbot "$@" "${cur_opts[@]}" - ;; - *) echo "This command is not implemented by kvmd-certbot." echo "To pass it into certbot under PST context use '--'." |