Skip to content
Snippets Groups Projects
Commit de079600 authored by nimrod's avatar nimrod
Browse files

Remove the Patchbay notification listener.

Replace with Nextcloud notifications.
parent 8f2b69bb
Branches
No related tags found
No related merge requests found
Pipeline #1173 passed
../../.local/share/applications/spammer.desktop
\ No newline at end of file
[Desktop Entry]
Name[en_US]=Spammer
Comment[en_US]=Spam Nimrod
Exec=/home/nimrod/Documents/bin/spammer
Icon=internet-chat-symbolic.svg
X-GNOME-Autostart-enabled=true
Type=Application
NoDisplay=true
#!/bin/sh
set -eu
# In case of an error, backof and reexec.
trap 'echo "Caught error, restarting..." >&2; sleep 1; exec $HOME/Documents/bin/spammer' EXIT
export PATH="$HOME/Documents/bin:$PATH"
URL='https://patchbay.pub/pubsub/1446c969-9a54-4b5b-83e0-bf88f22f289d'
while true
do
message="$(curl --silent "$URL")"
logger --tag "spammer" "$message"
if echo "$message" | grep --silent '^message='
then
message="$(echo "$message" | urldecode | sed 's/message=//')"
fi
echo "$message" | notify \
--urgency low \
--hint "string:desktop-entry:spammer"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment