From 0ee4f0ea443eeac4fb22266e18090416bcea0e48 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 29 Jan 2025 10:39:58 +0100 Subject: [PATCH] new: [apache] add ``check-external-https`` indirect action --- .../publish-dir/check-external-https | 30 +++++++++++++++++++ .../relations/web-proxy/check-external-https | 1 + 2 files changed, 31 insertions(+) create mode 100755 apache/actions/relations/publish-dir/check-external-https create mode 120000 apache/actions/relations/web-proxy/check-external-https diff --git a/apache/actions/relations/publish-dir/check-external-https b/apache/actions/relations/publish-dir/check-external-https new file mode 100755 index 0000000..9e78860 --- /dev/null +++ b/apache/actions/relations/publish-dir/check-external-https @@ -0,0 +1,30 @@ +#!/bin/bash +# compose: no-hooks + +## Load action gets a first argument a FILE/DIRECTORY/URL holding the necessary files. +## +## + +if [ -z "$SERVICE_DATASTORE" ]; then + echo "This script is meant to be run through 'compose' to work properly." >&2 + exit 1 +fi + +usage="$exname [-h|--help]" + +while [ "$1" ]; do + case "$1" in + "--help"|"-h") + print_usage + exit 0 + ;; + *) + err "Unexpected argument '$1'." + exit 1 + ;; + esac + shift +done +url=$(relation-get url) + +curl -Isf "$url" --max-time 5 >/dev/null diff --git a/apache/actions/relations/web-proxy/check-external-https b/apache/actions/relations/web-proxy/check-external-https new file mode 120000 index 0000000..7584938 --- /dev/null +++ b/apache/actions/relations/web-proxy/check-external-https @@ -0,0 +1 @@ +../publish-dir/check-external-https \ No newline at end of file