monkey/monkey — pull request #123 by kaspersky (2014-04-01 18:10:30+00:00)
Title: Systemd: add unit file monkey.service

This patch adds a unit file for systemd init system, as described in issue #39.
The installation of the unit file is triggered by the "--systemddir" passed to configure script, in the following way:
$ ./configure # no systemd unit file deployed
$ ./configure --systemddir # Unit file systemd.service is created with default installation path "/lib/systemd/system"
$ ./configure --systemddir=CUSTOM_PATH # Unit file systemd.service is created with installation path "CUSTOM_PATH"

The unit file is deployed is deployed using "make install" command, so you should also specify "--prefix" option for configure.

I tested the patch on archlinux and fedora (systemd init system) deploying the unit file in different system paths. The following commands were successful:
$ service monkey start
$ systemctl start monkey.service

I also tested on ubuntu (upstart init system), ensuring nothing is broken.

Signed-off-by: Vladimir Cernov