Issue with -blocknotify and script execution

2 replies 275 views
dave.forkMember
Posts: 375 · Reputation: 185
#1Mar 21, 2018, 10:58 AM
I have this bash script A that triggers another bash script B when a new block is found using -blocknotify. But for some reason, script B doesn’t get called. If I run script A from the terminal, it works fine and calls script B like it's supposed to. So it feels like there's some weird issue when the node runs script A. The logs show that script A is running, but what’s going wrong with B?
4 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#2Mar 21, 2018, 11:04 AM
Sounds like a classic case of environment issues. Sometimes bash scripts act differently because of different environment variables or paths. Have you tried replacing $RESTART_SCRIPT with the full path to the command? Just a thought. It might help you track down the issue.
0 Reply Quote Share
dave.forkMember
Posts: 375 · Reputation: 185
#3Mar 21, 2018, 11:48 AM
Oh, it was definitely the full path that caused the problem. Once I fixed that, everything worked perfectly. Thanks for the tip!
4 Reply Quote Share

Related topics