Compare commits

..

5 Commits

3 changed files with 39 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2025 Kris Lamoureux
# SPDX-License-Identifier: 0BSD
unset DOCKER_HOST
exec /usr/bin/docker "$@"

4
docker/.local/bin/podman Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2025 Kris Lamoureux
# SPDX-License-Identifier: 0BSD
exec /usr/bin/docker --context podman "$@"

View File

@@ -10,18 +10,44 @@ for cmd in curl jq; do
fi
done
USAGE="Usage: $0 [-v] <priority> <title> <message>"
VERBOSE=0
while getopts "hv" OPT; do
case "$OPT" in
h)
echo "$USAGE"
exit 0
;;
v)
VERBOSE=1
;;
*)
echo "$USAGE"
exit 1
;;
esac
done
shift $((OPTIND - 1))
if [ $# -lt 3 ]; then
echo "[ERROR]: Missing required arguments"
echo "Usage: $0 <priority> <title> <message>"
echo "$USAGE"
exit 1
fi
if [ -z "$GOTIFY_URL" ]; then
if [ -z "${GOTIFY_URL:-}" ] || [ -z "${GOTIFY_TOKEN:-}" ]; then
if [ -d ~/.config/gotify ] && [ -f ~/.config/gotify/env ]; then
# shellcheck disable=SC1090
. ~/.config/gotify/env
fi
fi
if [ -z "${GOTIFY_URL:-}" ]; then
echo "[ERROR]: GOTIFY_URL environment variable is not set"
exit 1
fi
if [ -z "$GOTIFY_TOKEN" ]; then
if [ -z "${GOTIFY_TOKEN:-}" ]; then
echo "[ERROR]: GOTIFY_TOKEN environment variable is not set"
exit 1
fi
@@ -57,5 +83,8 @@ if ! RESPONSE=$(
exit 1
fi
echo "$RESPONSE"
if [ "$VERBOSE" -eq 1 ]; then
echo "$RESPONSE"
fi
exit 0