From b1dfcbaa894697f924d73ce61b1882e7dc6dc0f5 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 23 Oct 2024 18:52:43 +0200 Subject: [PATCH] new: [apache] add action ``get-domain`` to linked charms --- .../actions/relations/publish-dir/get-domain | 31 +++++++++++++++++++ apache/actions/relations/web-proxy/get-domain | 1 + 2 files changed, 32 insertions(+) create mode 100755 apache/actions/relations/publish-dir/get-domain create mode 120000 apache/actions/relations/web-proxy/get-domain diff --git a/apache/actions/relations/publish-dir/get-domain b/apache/actions/relations/publish-dir/get-domain new file mode 100755 index 0000000..d3ffdff --- /dev/null +++ b/apache/actions/relations/publish-dir/get-domain @@ -0,0 +1,31 @@ +#!/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 + +set -e +relation-get url + diff --git a/apache/actions/relations/web-proxy/get-domain b/apache/actions/relations/web-proxy/get-domain new file mode 120000 index 0000000..eeb35a2 --- /dev/null +++ b/apache/actions/relations/web-proxy/get-domain @@ -0,0 +1 @@ +../publish-dir/get-domain \ No newline at end of file