Cleanup the deb template to use the debhelper scripts when possible. This greatly simplifies the rules file and ensures that things like man pages are installed correctly w/ proper permissions.
In addition, as /var/run is a tmpfs in recent Debian releases, avoid installing to this directory and instead create the runtime directory dynamically.
Finally, add a systemd unit file which will automatically be installed by dh_installinit when needed.
These changes have been tested with riak_ee on debian 8 as well as debian 7 to ensure backwards compatibility with non-systemd releases.
Cleanup the deb template to use the debhelper scripts when possible. This greatly simplifies the rules file and ensures that things like man pages are installed correctly w/ proper permissions.
In addition, as /var/run is a tmpfs in recent Debian releases, avoid installing to this directory and instead create the runtime directory dynamically.
Finally, add a systemd unit file which will automatically be installed by dh_installinit when needed.
These changes have been tested with riak_ee on debian 8 as well as debian 7 to ensure backwards compatibility with non-systemd releases.