Does anyone have some shellscript or ideas how to quickly and easily implement a program/script that would play a sound effect when either nud or bcexchanged has found a new block (ignoring stales/orphans).
Should the script poll the wallet for new incoming TXs or should it monitor the debug.log file for some specific strings?
#Only if current time is more than `first_active_hour` audio will be played. This is to be quiet during the night.
snd=$(( ( RANDOM % 3 ) + 1 ))
test "$hour" -gt "$first_active_hour" && (timeout --signal=SIGKILL 5s aplay -q "$sfx_path")
This worked with blocknotify, played the sound and all, but I haven’t yet managed to find a block so I don’t know if it works with walletnotify.
Just reporting that walletnotify seems to do the job very well. I’m still downloading the block chain from scratch but I am constantly hearing this sound effect already, probably because the node receives blocks that include transactions to my wallet that I have minted in the past.