This commit is contained in:
Maxim Devaev 2022-06-26 15:42:57 +03:00
parent fd70e8203c
commit 329b84e124

View File

@ -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 '--'."