Automating ad cert migration on trigger

Hi @Shane_Treweek,

the dev manual gives some pointers about certificates and events.

The script needs root permissions so to just make it work, I’d put it to the events of the node. Create a file /var/lib/nethserver/node/events/certificate-updated/10sambacert that contains your script. The directory certificate-updated needs to be created.

Make it executable:

chmod +x /var/lib/nethserver/node/events/certificate-updated/10sambacert

You could add some echo output to the script, it’s written to the logs so you can check if it ran correctly.

I’m not sure if this method still works after an update and maybe there’s a way to use 2 events inside the containers (rootless) for better security but I hope it’s a starting point.