From 26e16cdf199ad672d6ff553d41ef2ada80f23cfa Mon Sep 17 00:00:00 2001 From: groupnet Date: Tue, 4 Jun 2019 16:39:54 +0200 Subject: [PATCH] Updated DBus service (markdown) --- DBus-service.md | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/DBus-service.md b/DBus-service.md index 700ec2d..c931217 100644 --- a/DBus-service.md +++ b/DBus-service.md @@ -39,36 +39,6 @@ Example with `dbus-send`: dbus-send --session --type=method_call --print-reply --dest="org.asamk.Signal" /org/asamk/Signal org.asamk.Signal.sendMessage string:MessageText array:string: string:RECIPIENT -### Multiple system buses - -As an extension to [System Bus](DBus-service#system-bus), you can run multiple daemons with different bus names by providing the `--busname` parameter. In this guide we use the bus naming scheme 'org.asamk.Signal_NUMBER' where NUMBER is the user number **without** the leading + sign. - -Again, the following steps assume you created a user named *signal-cli*. -For each (named) system bus, a config file is needed to allow the signal-cli user to take a name on the system bus. An template config file can be found in `data/org.asamk.Signal_NUMBER.conf`. This file also configures that any user can talk with the signal-cli daemon. - -The `data/signal-cli@.service` file configures a systemd service template that takes the NUMBER as argument. We start each service when systemd's _multi-user.target_ is reached. - -Executed these commands **once** as root to provide the signal-cli systemd service: -```bash -sed -e "s|%dir%||" data/signal-cli@.service > /etc/systemd/system/signal-cli@.service -systemctl daemon-reload -``` -Mind the fact that signal.service executes the signal-cli with "--config /var/lib/signal-cli". -If you registered with user signal-cli, remove the config option. - -Executed these commands **for each number** as root to provide the corresponding dbus configuration: -```bash -sed -e "s|%number%||" data/org.asamk.Signal_NUMBER.conf > /etc/dbus-1/system.d/org.asamk.Signal_.conf - -systemctl reload dbus.service - -systemctl enable signal-cli@.service -systemctl start signal-cli@.service -``` -Make sure to use "--dbus-system" and "--dbusname 'org.asamk.Signal_NUMBER'" with the send command: - -```signal-cli --dbus-system --busname "org.asamk.Signal_" send -m "Message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]``` - ### Receive messages from signal-cli daemon The signal-cli daemon publishes new messages to dbus. Here's an example using python: