Explanation
This script simply grabs whatever the trigger sends as data so you can verify what you're receiving to then use this as input for checking your trigger logic.
We recommend using this script when setting up triggers for the first time so you have a better feel what is going on.
Usage
Just add this to the trigger you want to debug, note that this can be added alongside any other trigger simply by adding the trigger for that stream another time and then target this script, but you might want to make it non-blocking.
behaviour
This trigger prints the exact output of the trigger & adds the cookie information if there.
You can uncomment the True response to also send a True
to the other side should you wish to test True
/False
responses.
Script
#!/bin/bash
LOG=/media/triggerlog.log
echo -e `date +'%Y.%m.%d %H:%M:%S'` "Trigger $1:\n`cat`\nCookie:${Cookie}\n" >> $LOG
#echo -e "True \n'cat'\n"