Issue with -blocknotify

2 replies 129 views
paul.stakeHero Member
Posts: 651 · Reputation: 3798
#1Jul 1, 2020, 09:23 PM
I've got a bash script A that triggers another bash script B. I'm using the -blocknotify option to run script A when a new block pops up, but for some reason, it doesn't execute script B. I tested script A directly from the terminal, and it successfully runs script B, which makes me think there’s something off with how the node executes the script. I’ve also checked the logs and confirmed that the node does indeed run script A since I can see its debug logs. Could it be a permissions issue or something else? Here’s the line of code in script A that calls script B:
2 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#2Jul 2, 2020, 02:48 AM
When I get "weird, annoying things" in bash, it's often caused by things like different environment variables, or relative paths. I'd start by trying what happens if you replace $RESTART_SCRIPT by a hardcoded command starting from /path/command.
2 Reply Quote Share
paul.stakeHero Member
Posts: 651 · Reputation: 3798
#3Jul 2, 2020, 03:57 AM
It had to do with full path... Problem solved. Thank you!
2 Reply Quote Share

Related topics