Posts for: #curl

NTFY via systemd on bootup/shutdown

This send a NTFY on bootup and shutdown nano /etc/systemd/system/ntfy-notify.service [Unit] Description=Sends NTFY on bootup/shutdown After=multi-user.target [Service] Type=oneshot ExecStart=/usr/bin/curl -d "%H booted up" 'http://ntfy.sh/topic' ExecStop=/usr/bin/curl -d "%H shutting down" 'http://ntfy.sh/topic' RemainAfterExit=yes [Install] WantedBy=multi-user.target systemctl daemon-reload systemctl enable ntfy-notify.service
MORE →

Use Gotify CLI with just curl and jq

Install Reqs apt install -y curl jq Add to bashrc file nano ~/.bashrc function gotify() { if [[ -z "$1"] || -z "$2" || -z "$3" ]]; then echo echo "Usage: gotify [title] [message] [priority]"; echo else source /etc/gotify.conf URL="${URL}/message?token=${TOKEN}" command=$(curl -s "${URL}" -F "title=${1}" -F "message=${2}" -F "priority=${3}" | jq '.id') && echo "Sent with ID: ${command}" unset URL; unset TOKEN fi } Add config nano /etc/gotify.conf URL="https://URL.COM" TOKEN="APP_TOKEN"
MORE →

Comments: