diff --git a/README.md b/README.md index 582a036..4447f2e 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ References/documentation * [D-Bus Specification](https://dbus.freedesktop.org/doc/dbus-specification.html) * [sd-bus Overview](http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html) * [Tutorial: Using sdbus-c++](doc/using-sdbus-c++.md) +* [Systemd and dbus configuration](doc/systemd-dbus-config.md) Contributing ------------ diff --git a/doc/systemd-dbus-config.md b/doc/systemd-dbus-config.md new file mode 100644 index 0000000..b32a632 --- /dev/null +++ b/doc/systemd-dbus-config.md @@ -0,0 +1,54 @@ +Systemd and dbus configuration +======================= + +**Table of contents** + +1. [Introduction](#introduction) +2. [Systemd configuration](#systemd-configuration) +3. [Dbus configuration](#dbus-configuration) + +Introduction +------------ + +To run executable as a systemd service you may need some additional setup. For example, you may need explicitly allow +the usage of your service. Following chapters contain template configurations. + + +Systemd configuration +--------------------------------------- + +Filename should use `.service` extension. It also must be placed in configuration directory (/etc/systemd/system in +Ubuntu 18.04.1 LTS) + +``` +[Unit] +Description=nameOfService + +[Service] +ExecStart=/path/to/executable + +[Install] +WantedBy=multi-user.target +``` + +Dbus configuration +------------------ + +Typical default D-Bus configuration does not allow to register services except explicitly allowed. Filename should +contain name of your service, e.g `/etc/dbus-1/system.d/org.sdbuscpp.concatenator.conf`. So, here is template +configuration to use dbus interface under root: + +``` + + + + + + + + +``` + +If you need access from other user `root` should be substituted by desired username. For more refer to `man dbus-daemon`. \ No newline at end of file