Add SIGTERM Handling to monitor and publish (bash) scripts