Fix Invalid argument

main
Anthony 2025-03-22 01:19:28 +08:00
parent b065be4d69
commit 0cd3b07c30
1 changed files with 14 additions and 0 deletions

View File

@ -728,6 +728,12 @@ for arg in "$@"; do
--email=*)
EMAIL="${arg#*=}"
;;
--remove-cert=*)
REMOVE_CERT="${arg#*=}"
;;
--confirm=*)
CONFIRM="${arg#*=}"
;;
*)
echo "Invalid argument: $arg"
exit 1
@ -735,6 +741,14 @@ for arg in "$@"; do
esac
done
# Check for certificate removal request
if [[ -n "${REMOVE_CERT:-}" ]]; then
if [[ "${REMOVE_CERT}" == "yes" ]]; then
remove_ssl_certificate "${DOMAIN}" "${CONFIRM:-no}"
exit $?
fi
fi
# Input validation
log "Validating inputs..."
if [[ -z "${PUBLIC_IP:-}" || -z "${DOMAIN:-}" ]]; then