Systemd requires you to launch
systemctl daemon-reload
in order for change to service unit files (its version of init scripts) to be refreshed correctly - https://tickets.puppetlabs.com/browse/PUP-3483.
In addition, "service" type is broken for Debian jessie, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775795
So, what we need is a new type/define that has the following properties:
- Includes both the service declaration and its (optional) custom init/service file
- Can autodetect if the init system is systemd, upstart or init, and install the correct file accordingly
- Will call daemon-reload upon any changes to the service file, and before any action is taken on the service itself, in systemd
- Will correctly handle service declarations, again based on the init system
- Allow common templating of all resources