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?
Issue with -blocknotify and script execution
2 replies 275 views
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.
Oh, it was definitely the full path that caused the problem. Once I fixed that, everything worked perfectly. Thanks for the tip!