Commit 9ea025d9 authored by Colin Walters's avatar Colin Walters Committed by Bastien Nocera

Add a systemd unit file

It's just better if we get activated via systemd rather than dbus.
Various bits of configury/makefile taken from polkit.

https://bugs.freedesktop.org/show_bug.cgi?id=58468
parent 870a7a83
......@@ -55,6 +55,15 @@ AM_CONDITIONAL(BUILD_MAN, test x"$POD2MAN" != "x")
GTK_DOC_CHECK([1.3])
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[],
[with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
])
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"])
AS_AC_EXPAND(DATADIR, $datadir)
DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
......
......@@ -9,6 +9,15 @@ $(dbus_services_DATA): $(dbus_services_in_files)
dbus_confdir = $(sysconfdir)/dbus-1/system.d
dbus_conf_DATA = net.reactivated.Fprint.conf
systemdservice_in_files = fprintd.service.in
if HAVE_SYSTEMD
systemdservicedir = $(systemdsystemunitdir)
systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
$(systemdservice_DATA): $(systemdservice_in_files) Makefile
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
endif
polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = net.reactivated.fprint.device.policy.in
......
[Unit]
Description=Fingerprint Authentication Daemon
Documentation=man:fprintd(1)
[Service]
Type=dbus
BusName=net.reactivated.Fprint
ExecStart=@libexecdir@/fprintd
......@@ -2,3 +2,4 @@
Name=net.reactivated.Fprint
Exec=@LIBEXECDIR@/fprintd
User=root
SystemdService=fprintd.service
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment