Compare commits
3 Commits
0d622723ac
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
999d745710
|
|||
|
655e6fffac
|
|||
|
1ad726d0f7
|
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,15 +10,36 @@ 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 [ -d ~/.config/gotify ] && [ -f ~/.config/gotify/env ]; then
|
||||
# shellcheck disable=SC1090
|
||||
. ~/.config/gotify/env
|
||||
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
|
||||
@@ -62,5 +83,8 @@ if ! RESPONSE=$(
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$RESPONSE"
|
||||
if [ "$VERBOSE" -eq 1 ]; then
|
||||
echo "$RESPONSE"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user