mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-09-01 06:28:11 +00:00
Created DBus service (markdown)
parent
d1f170d6d5
commit
11e99db666
31
DBus-service.md
Normal file
31
DBus-service.md
Normal file
@ -0,0 +1,31 @@
|
||||
signal-cli can run in daemon mode and provides an experimental dbus interface.
|
||||
For dbus support you need jni/unix-java.so installed on your system (Debian: libunixsocket-java ArchLinux: libmatthew-unix-java (AUR)).
|
||||
|
||||
* Run in daemon mode (dbus session bus)
|
||||
|
||||
signal-cli -u USERNAME daemon
|
||||
|
||||
* Send a message via dbus
|
||||
|
||||
signal-cli --dbus send -m "Message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
|
||||
|
||||
### System bus
|
||||
|
||||
To run on the system bus you need to take some additional steps.
|
||||
It’s advisable to run signal-cli as a separate unix user, the following steps assume you created a user named *signal-cli*.
|
||||
These steps, executed as root, should work on all distributions using systemd.
|
||||
|
||||
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.
|
||||
|
||||
```bash
|
||||
cp data/org.asamk.Signal.conf /etc/dbus-1/system.d/
|
||||
cp data/org.asamk.Signal.service /usr/share/dbus-1/system-services/
|
||||
cp data/signal.service /etc/systemd/system/
|
||||
sed -i -e "s|%dir%|<INSERT_INSTALL_PATH>|" -e "s|%number%|<INSERT_YOUR_NUMBER>|" /etc/systemd/system/signal.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable signal.service
|
||||
systemctl reload dbus.service
|
||||
```
|
||||
|
||||
Make sure to use "--dbus-system" with the send command, the service will be autostarted by dbus the first time it is requested.
|
||||
Loading…
x
Reference in New Issue
Block a user