Sorry I’ve been absent for a while and just found time to setup and migrate to ns8 ive got most of it done, including the samba cert from LE butim now trying to
Out of curiosity if i was to create a script to automate the process say something like
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.
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.
Adding custom executable scripts as event and action steps is possible and does not conflict with module updates. However, they are not included in backups.
For the future, I’d like to develop an authenticated HTTP API to distribute certificates outside of the cluster. This would allow external systems to import NS8 certificates using a simple cron job.
Also I was thinking (my idea is not in a concrete form yet but thought I’d put it down as a starting point)
But somehow a module that uses cloud flare api to add a DNS reference I did make a script for it but the main idea would be something like this
Module has fields on it’s settings page on ns8 to enter token, email, sub domain, IP and record type* that creates my script with those and runs it creating the entry in cloud flare.
*Note:
maybe have a drop down menu for record type that changes the options asked for like a record as above
cname with sub domain and target,
txt records with appropriate fields etc.
Could also make something similar for opnsense