1

I want execute a command if a given service is crashed, but I only found that conditionals:

sudo openrc -s <service> --ifstarted <command>
sudo openrc -s <service> --ifstopped <command>
sudo rc-service <service> --ifexists <command>
sudo rc-service <service> --ifinactive <command>
sudo rc-service <service> --ifnotstarted <commmand>

And no one of them is triggered only when a service status is crashed.

Your Answer

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

Browse other questions tagged or ask your own question.