mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
Add a systemd service file
We don't have dbus-activation yet, so just define it as a normal dbus service for now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,3 +28,4 @@ libtool
|
||||
ratbagctl
|
||||
ratbagd
|
||||
stamp-*
|
||||
ratbagd.service
|
||||
|
||||
@@ -96,3 +96,12 @@ ratbagd_LDADD = \
|
||||
$(LIBUDEV_LIBS) \
|
||||
$(LIBSYSTEMD_LIBS) \
|
||||
$(LIBRATBAG_LIBS)
|
||||
|
||||
unitdir = $(SYSTEMD_UNIT_DIR)
|
||||
unit_DATA = ratbagd.service
|
||||
|
||||
$(unit_DATA): $(unit_DATA).in
|
||||
$(AM_V_GEN)$(SED) -e 's|__BIN_PREFIX__|$(bindir)|g' < $< > $@
|
||||
|
||||
EXTRA_DIST += ratbagd.service.in
|
||||
BUILT_SOURCES += ratbagd.service
|
||||
|
||||
10
configure.ac
10
configure.ac
@@ -131,6 +131,16 @@ PKG_CHECK_MODULES([LIBUDEV], [libudev])
|
||||
PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd >= 227])
|
||||
PKG_CHECK_MODULES([LIBRATBAG], [libratbag])
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# options
|
||||
AC_ARG_WITH([systemd-unit-dir],
|
||||
AS_HELP_STRING([--with-systemd-unit-dir=DIR],
|
||||
[systemd unit directory [[default=$libdir/systemd/system]]]),
|
||||
[unitdir="$withval"],
|
||||
[unitdir="$libdir/systemd/system"])
|
||||
SYSTEMD_UNIT_DIR=${unitdir}
|
||||
AC_SUBST(SYSTEMD_UNIT_DIR)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# report
|
||||
|
||||
|
||||
10
ratbagd.service.in
Normal file
10
ratbagd.service.in
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Daemon to introspect and modify configuable mice
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
BusName=org.freedesktop.ratbag1
|
||||
ExecStart=__BIN_PREFIX__/ratbagd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user