1

Is it possible to hook some script to shutting down sequence for Linux?

To give you a bit more context processes of nodes of the cluster are started as processes from cluster -master. They are not running as services. However if someone restart a node and didn't stop the appropriate process manually, it causes a troubles because the node hasn't been stopped gracefully.

I would like to avoid this situation. Processes they don't run as services.

0

I'd link a script that would shut down the nodes to /etc/rc6.d

It'll run on runlevel 6, that coresponds to shutdown sequence. Link name should be of format KXXName, where XX is a sequence number.

I'm assuming here that you have control over the nodes and you are able to wait for them to shut down gracefully.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.