add support for systemd

This adds support for systemd.
The default behavior is to use sysv, which means that nothing will change for default configurations.