diff options
-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 '--'." |