I'm trying to write an Ansible module to be able to manage dinit services. To make it idempotent, I have to check if a given service is running or not (easy) and also if it's enabled or not (this is my question).
Can we assume that, if the service name I pass as parameter to my module exists in the /etc/dinit.d/boot.d as a symlink, it's "enabled"? Or is there a better way to know it, using dinitctl? I've read dinitctl --help but couldn't find it.
I'm trying to write an Ansible module to be able to manage dinit services. To make it idempotent, I have to check if a given service is running or not (easy) and also if it's enabled or not (this is my question).
Can we assume that, if the service name I pass as parameter to my module exists in the
/etc/dinit.d/boot.das a symlink, it's "enabled"? Or is there a better way to know it, usingdinitctl? I've read dinitctl --help but couldn't find it.