This systemd service files can be used to launch a single kea instance on a server.
This requires that the config files are located under /etc/kea/ and the config files themself match this pattern:
- dhcp4 server: kea-dhcp6.conf
- dhcp6 server: kea-dhcp4.conf
- ddns server: kea-ddns.conf
- ctrl agent: kea-ctrl-agent.conf
You can name them differently but then have to adjust the service files accordingly
The service files can used by copying them to the systemd service directory (eg. on debian /lib/systemd/system/ /etc/systemd/system/). Then enable the different kea services by running:
- dhcp4 server:
systemctl enable kea-dhcp4-server
- dhcp6 server:
systemctl enable kea-dhcp6-server
- ddns server:
systemctl enable kea-ddns-server
- ctrl agent:
systemctl enable kea-ctrl-agent
If you want that the kea services automatically restart if they crash you can add Restart=always
to the [Service]
section of the service files
See https://gist.github.com/Skywalker-11/4911124c99a39572ade4065743bd3a54 for a version with multiple instances on a single server
Fixed