Skip to content

Commit

Permalink
[systemd] Handle D-Bus autostart via systemd. JB#37678
Browse files Browse the repository at this point in the history
Profiled autostart is handled by dbus daemon without involving systemd.

Switch to dbus activation via systemd to make it possible to do things
like block profiled restarts during shutdown sequence.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 12, 2017
1 parent 71f6fbe commit 634eb74
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -347,6 +347,9 @@ else
install -m755 -d $(ROOT)$(PREFIX)/share/dbus-1/services
install -m644 profiled.service \
$(ROOT)$(PREFIX)/share/dbus-1/services/profiled.service
install -m755 -d $(ROOT)$(PREFIX)/lib/systemd/user/
install -m644 systemd/profiled.service \
$(ROOT)$(PREFIX)/lib/systemd/user/
endif
# ----------------------------------------------------------------------------
# profileclient.deb
Expand Down
3 changes: 2 additions & 1 deletion profiled.service
@@ -1,3 +1,4 @@
[D-BUS Service]
Name=com.nokia.profiled
Exec=/usr/bin/profiled
Exec=/bin/false
SystemdService=profiled.service
1 change: 1 addition & 0 deletions rpm/profiled.spec
Expand Up @@ -87,6 +87,7 @@ rm %{buildroot}/%{_libdir}/libprofile.a
%{_bindir}/%{name}
%{_libdir}/libprofile.so.*
%{_datadir}/dbus-1/services/profiled.service
%{_libdir}/systemd/user/profiled.service

%files doc
%defattr(-,root,root,-)
Expand Down
7 changes: 7 additions & 0 deletions systemd/profiled.service
@@ -0,0 +1,7 @@
[Unit]
Description=Profile Daemon

[Service]
Type=dbus
BusName=com.nokia.profiled
ExecStart=/usr/bin/profiled

0 comments on commit 634eb74

Please sign in to comment.