prologic-saltyim/hooks/pushover-prehook.sh

23 lines
559 B
Bash
Executable File

#!/bin/sh
if ! command -v pushover-cli > /dev/null; then
echo "pushover-cli not installed, go install github.com/adrianrudnik/pushover-cli@master"
exit 1
fi
echo "PUSHOVER_CLI_API: $PUSHOVER_CLI_API"
echo "PUSHOVER_CLI_USER: $PUSHOVER_CLI_USER"
if [ -z "$PUSHOVER_CLI_API" ]; then
echo "PUSHOVER_CLI_API not set"
exit 1
fi
if [ -z "$PUSHOVER_CLI_USER" ]; then
echo "PUSHOVER_CLI_USER not set"
exit 1
fi
# Install: go install github.com/adrianrudnik/pushover-cli@master
pushover-cli push -s incoming -t Salty "You have a new Salty IM Message"