Page 1 of 1

[bash] Send console output via Discord Webhook

Posted: 10 Sep 2021, 04:46
by rednoah
send-discord-log.sh is a universally useful little bash script, that takes an arbitrary command, executes that command, captures the console output, and then sends you a Discord message.

Usage:

Code: Select all

send-discord-log filebot -script fn:sysinfo
Install:

Code: Select all

# Fetch script
curl -O https://raw.githubusercontent.com/filebot/plugins/master/bash/send-discord-log.sh

# Make script executable
chmod +x send-discord-log.sh

# Link script into the path
ln -s $PWD/send-discord-log.sh /usr/bin/send-discord-log
Configure:

Code: Select all

DISCORD_WEBHOOK_URL="<Copy Webhook URL>"

Image