Deprecate daemon mode without explicit mode flag

This commit is contained in:
AsamK 2024-01-30 17:44:51 +01:00
parent 080c14d111
commit 2ab5b2817e
4 changed files with 17 additions and 16 deletions

View file

@ -8,7 +8,7 @@ After=network-online.target
[Service]
Type=dbus
Environment="SIGNAL_CLI_OPTS=-Xms2m"
ExecStart=%dir%/bin/signal-cli --config /var/lib/signal-cli daemon --system
ExecStart=%dir%/bin/signal-cli --config /var/lib/signal-cli daemon --dbus-system
User=signal-cli
BusName=org.asamk.Signal

View file

@ -8,7 +8,7 @@ After=network-online.target
[Service]
Type=dbus
Environment="SIGNAL_CLI_OPTS=-Xms2m"
ExecStart=%dir%/bin/signal-cli -a %I --config /var/lib/signal-cli daemon --system
ExecStart=%dir%/bin/signal-cli -a %I --config /var/lib/signal-cli daemon --dbus-system
User=signal-cli
BusName=org.asamk.Signal

View file

@ -25,7 +25,7 @@ For this use-case, it has a dbus and a JSON-RPC interface, that can be used to s
For some functionality the Signal protocol requires that all messages have been received from the server.
The `receive` command should be regularly executed.
In daemon mode messages are continuously received.
In daemon mode messages are by default continuously received.
== Options
@ -720,16 +720,9 @@ Alternatively, specify the group IDs for which to get the attachment.
=== daemon
signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
*--dbus*::
Export DBus interface on user bus. +
See **signal-cli-dbus**(5) for info on the dbus interface.
*--dbus-system*::
Export DBus interface on system bus. +
See **signal-cli-dbus**(5) for info on the dbus interface.
signal-cli can run in daemon mode and provides JSON-RPC or an experimental dbus interface.
If no `-a` account is given, all local accounts will be loaded.
Multiple interfaces can be used at the same time, e.g. `daemon --socket --dbus`
*--socket [SOCKET]*::
Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket). +
@ -744,6 +737,14 @@ Expose a JSON-RPC interface as http endpoint (default localhost:8080).
The JSON-RPC endpoint is `/api/v1/rpc`. +
See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
*--dbus*::
Export DBus interface on user bus. +
See **signal-cli-dbus**(5) for info on the dbus interface.
*--dbus-system*::
Export DBus interface on system bus. +
See **signal-cli-dbus**(5) for info on the dbus interface.
*--ignore-attachments*::
Dont download attachments of received messages.

View file

@ -46,9 +46,7 @@ public class DaemonCommand implements MultiLocalCommand, LocalCommand {
public void attachToSubparser(final Subparser subparser) {
final var defaultSocketPath = new File(new File(IOUtils.getRuntimeDir(), "signal-cli"), "socket");
subparser.help("Run in daemon mode and provide a JSON-RPC or an experimental dbus interface.");
subparser.addArgument("--dbus")
.action(Arguments.storeTrue())
.help("Expose a DBus interface on the user bus (the default, if no other options are given).");
subparser.addArgument("--dbus").action(Arguments.storeTrue()).help("Expose a DBus interface on the user bus.");
subparser.addArgument("--dbus-system", "--system")
.action(Arguments.storeTrue())
.help("Expose a DBus interface on the system bus.");
@ -190,6 +188,8 @@ public class DaemonCommand implements MultiLocalCommand, LocalCommand {
&& httpAddress == null
&& inheritedChannel == null
)) {
logger.warn(
"Running daemon command without explicit mode is deprecated. Use --dbus to use the dbus interface.");
daemonHandler.runDbus(false);
}
}