Commit 18c354dd authored by Tomi Leppänen's avatar Tomi Leppänen

Use systemd activation for MMS engine dbus

[systemd] Use systemd activation for MMS engine dbus. Contributes to JB#24120

This allows parallel startup of dbus services. Also prevents MMS engine
startup when system is shutting down in case that ever happens.

Change dbus service file to only describe dbus service and add systemd
service file to start the service. Change spec and project file to
include the new file.
Signed-off-by: Tomi Leppänen's avatarTomi Leppänen <tomi.leppanen@jolla.com>
parent 7ef151b4
[Unit]
Description=MMS engine service
[Service]
Type=dbus
BusName=org.nemomobile.MmsEngine
ExecStart=/usr/sbin/mms-engine -o syslog
......@@ -42,6 +42,7 @@ OTHER_FILES += \
org.nemomobile.MmsEngine.push.conf \
org.nemomobile.MmsEngine.dbus.conf \
org.nemomobile.MmsEngine.service \
dbus-org.nemomobile.MmsEngine.service \
org.nemomobile.MmsEngine.xml
CONFIG(debug, debug|release) {
......
# Goes to /usr/share/dbus-1/system-services
[D-BUS Service]
Name=org.nemomobile.MmsEngine
Exec=/usr/sbin/mms-engine -o syslog
Exec=/bin/false
User=nemo
SystemdService=dbus-org.nemomobile.MmsEngine.service
......@@ -37,6 +37,7 @@ BuildRequires: pkgconfig(Qt5Gui)
%define dbusconfig %{_datadir}/dbus-1/system-services
%define dbuspolicy %{_sysconfdir}/dbus-1/system.d
%define glibschemas %{_datadir}/glib-2.0/schemas
%define systemdconfig %{_libdir}/systemd/system
# Activation method:
%define pushconfig %{_sysconfdir}/ofono/push_forwarder.d
......@@ -65,12 +66,14 @@ make -C mms-send KEEP_SYMBOLS=1 release
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{systemdconfig}
mkdir -p %{buildroot}%{dbusconfig}
mkdir -p %{buildroot}%{dbuspolicy}
mkdir -p %{buildroot}%{pushconfig}
mkdir -p %{buildroot}%{glibschemas}
mkdir -p %{buildroot}%{_prefix}/bin/
cp %{src}/build/release/%{exe} %{buildroot}%{_sbindir}/
cp %{src}/dbus-%{dbusname}.service %{buildroot}%{systemdconfig}/
cp %{src}/%{dbusname}.service %{buildroot}%{dbusconfig}/
cp %{src}/%{dbusname}.dbus.conf %{buildroot}%{dbuspolicy}/%{dbusname}.conf
cp %{src}/%{dbusname}.push.conf %{buildroot}%{pushconfig}/%{dbusname}.conf
......@@ -93,6 +96,7 @@ make -C mms-lib/test test
%config %{dbuspolicy}/%{dbusname}.conf
%config %{pushconfig}/%{dbusname}.conf
%{dbusconfig}/%{dbusname}.service
%{systemdconfig}/dbus-%{dbusname}.service
%{_sbindir}/%{exe}
%files tools
......
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