I have a bash script A which calls another bash script B. I use -blocknotify option to call bash script A when a new block is found, but bash script B is not called. I have tried calling bash script A from terminal, and it correctly calls bash script B, which makes me think there's a special treatment when the node calls a bash script. I have also confirmed that node does run script A, as I can see the debug log of script A.
Does it lack permission, or something? The line of code that calls script B is this:
bash "$RESTART_SCRIPT" $BLOCK_HASH >> debug.txt 2>&1