Saturn
Saturn

Reputation: 976

systemd service not starting using dbus interface

I am trying to start systemd service usnig dbus service. I am following the example 5 of below mentioned link: http://www.freedesktop.org/software/systemd/man/systemd.service.html

My dbus service is:

[D-BUS Service]
Name=com.native.Test_Dbus_060
Exec=/usr/sbin/server_060
User=apps
StandardOutput=tty
TTYPath=/dev/ttyS0
SystemdService=com.native.Test_Dbus_060.service

my systemd com.native.Test_Dbus_060.service is:

[Unit]
Description=dbus test server

[Service]
Type=dbus
BusName=com.native.Test_Dbus_060
ExecStart=/usr/sbin/server_060
StandardOutput=tty
TTYPath=/dev/ttyS0

[Install]

WantedBy=multi-user.target

Now when I am trying to activate com.native.Test_Dbus_060.service service by acquiring the above mentioned bus in dbus, its not starting. Both server_060 and client_060 are using dbus APIs for IPC.

NOTE: my server_060 and client_060 are communicating fine when using directly without systemd service and dbus service.

Here my first query is, whether such type of systemd service start possible? and if yes then why it is not working in my case?

Upvotes: 2

Views: 3063

Answers (1)

Sergey Kanaev
Sergey Kanaev

Reputation: 592

Well, if you have a closer look at the page you referenced you'll notice this note:

For bus-activatable services, don't include a "[Install]" section in the systemd service file, but use the SystemdService= option in the corresponding DBus service file, for example (/usr/share/dbus-1/system-services/org.example.simple-dbus-service.service)

Upvotes: 1

Related Questions