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>
gdb.command \
corewatcher.conf
+systemdunitdir = $(prefix)/lib/systemd/system
+dist_systemdunit_DATA = src/corewatcher.service
+
EXTRA_DIST = \
COPYING \
$(man_MANS)
# Checks for library functions.
AC_FUNC_MALLOC
-AC_OUTPUT
+AC_OUTPUT(src/corewatcher.service)
AC_MSG_RESULT([
corewatcher $VERSION
========
--- /dev/null
+[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