mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
fix
This commit is contained in:
parent
fd70e8203c
commit
329b84e124
@ -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 '--'."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user