Compare commits
5 Commits
13a7988ade
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
999d745710
|
|||
|
655e6fffac
|
|||
|
1ad726d0f7
|
|||
|
0d622723ac
|
|||
|
94e50e97e1
|
@@ -1,3 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-FileCopyrightText: 2025 Kris Lamoureux
|
||||||
|
# SPDX-License-Identifier: 0BSD
|
||||||
unset DOCKER_HOST
|
unset DOCKER_HOST
|
||||||
exec /usr/bin/docker "$@"
|
exec /usr/bin/docker "$@"
|
||||||
|
|||||||
4
docker/.local/bin/podman
Executable file
4
docker/.local/bin/podman
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-FileCopyrightText: 2025 Kris Lamoureux
|
||||||
|
# SPDX-License-Identifier: 0BSD
|
||||||
|
exec /usr/bin/docker --context podman "$@"
|
||||||
@@ -10,18 +10,44 @@ for cmd in curl jq; do
|
|||||||
fi
|
fi
|
||||||
done
|
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
|
if [ $# -lt 3 ]; then
|
||||||
echo "[ERROR]: Missing required arguments"
|
echo "[ERROR]: Missing required arguments"
|
||||||
echo "Usage: $0 <priority> <title> <message>"
|
echo "$USAGE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
echo "[ERROR]: GOTIFY_URL environment variable is not set"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$GOTIFY_TOKEN" ]; then
|
if [ -z "${GOTIFY_TOKEN:-}" ]; then
|
||||||
echo "[ERROR]: GOTIFY_TOKEN environment variable is not set"
|
echo "[ERROR]: GOTIFY_TOKEN environment variable is not set"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -57,5 +83,8 @@ if ! RESPONSE=$(
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$VERBOSE" -eq 1 ]; then
|
||||||
echo "$RESPONSE"
|
echo "$RESPONSE"
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user