Add systemd unit file
authorTim Pepper <timothy.c.pepper@linux.intel.com>
Thu, 13 Sep 2012 18:52:42 +0000 (11:52 -0700)
committerTim Pepper <timothy.c.pepper@linux.intel.com>
Thu, 13 Sep 2012 18:52:42 +0000 (11:52 -0700)
This should be a correct way to add a systemd unit file in autotools.  This
unit file simply allows systemd to run the corewatcher daemon.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Makefile.am
configure.ac
src/corewatcher.service.in [new file with mode: 0644]

index 3269eb7..4531c66 100644 (file)
@@ -9,6 +9,9 @@ dist_corewatcherconf_DATA = \
        gdb.command \
        corewatcher.conf
 
+systemdunitdir = $(prefix)/lib/systemd/system
+dist_systemdunit_DATA = src/corewatcher.service
+
 EXTRA_DIST = \
        COPYING \
        $(man_MANS)
index ff96b57..ccbe86f 100644 (file)
@@ -29,7 +29,7 @@ AC_TYPE_SSIZE_T
 # Checks for library functions.
 AC_FUNC_MALLOC
 
-AC_OUTPUT
+AC_OUTPUT(src/corewatcher.service)
 AC_MSG_RESULT([
        corewatcher $VERSION
        ========
diff --git a/src/corewatcher.service.in b/src/corewatcher.service.in
new file mode 100644 (file)
index 0000000..a261532
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Nitra corefile monitor for collecting crash data
+DefaultDependencies=no
+After=sysinit.target
+
+[Service]
+Type=forking
+ExecStart=@prefix@/bin/corewatcher
+
+[Install]
+WantedBy=multi-user.target