diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 746727d4..039a9c7c 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -1,5 +1,6 @@ name: Shellcheck on: + workflow_dispatch: push: branches: - '*' diff --git a/deploy/arubacentral.sh b/deploy/arubacentral.sh new file mode 100644 index 00000000..2191c6b0 --- /dev/null +++ b/deploy/arubacentral.sh @@ -0,0 +1,183 @@ +#!/usr/bin/env sh +# Aruba Central deploy hook for acme.sh + +arubacentral_deploy() { + # Generate unique certificate name with a proper random number (5 digits) + _cdomain="$(echo "$1" | sed 's/*/WILDCARD_/g')_$(tr -dc '0-9' /dev/null 2>&1; then + _debug "✅ Previous certificate not found - skipping." + elif echo "$response" | jq -e '.error_code' >/dev/null 2>&1; then + _err "❌ Failed to delete previous certificate: $(echo "$response" | jq -r '.description')" + else + _debug "✅ Previous certificate deleted successfully." + fi + else + _debug "No previous certificate found. Skipping deletion." + fi +} diff --git a/deploy/fortigate.sh b/deploy/fortigate.sh index a98b7401..915ad32e 100644 --- a/deploy/fortigate.sh +++ b/deploy/fortigate.sh @@ -155,7 +155,7 @@ fortigate_deploy() { _debug "No CA certificate provided." fi - # Set new certificate as current web cert + # Set new certificate as active set_active_web_cert || return 1 # Cleanup previous certificate