I wanted a notification for every time a new SSH session has begun.
- cURL
- jq
- discord.sh (assumes you have it installed in your
$PATH
)
Simply add the following lines to your ~/.bashrc
, ~/.zshrc
or other sourced file.
# Discord webhook (put the webhook URL inside the quotes)
export WEBHOOK_URL=""
# Execute webhook
(curl -sL https://raw.githubusercontent.com/fieu/shell-notifier/master/notify.sh | bash -s "$WEBHOOK_URL" &)
Simply open a shell!