]> nmode's Git Repositories - signal-cli/commitdiff
Add example files for making a dbus activatable service
authorAsamK <asamk@gmx.de>
Wed, 16 Dec 2015 20:34:57 +0000 (21:34 +0100)
committerAsamK <asamk@gmx.de>
Wed, 16 Dec 2015 20:38:30 +0000 (21:38 +0100)
data/org.asamk.TextSecure.conf [new file with mode: 0644]
data/org.asamk.TextSecure.service [new file with mode: 0644]
data/textsecure.service [new file with mode: 0644]

diff --git a/data/org.asamk.TextSecure.conf b/data/org.asamk.TextSecure.conf
new file mode 100644 (file)
index 0000000..5267a79
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+        <policy user="textsecure">
+                <allow own="org.asamk.TextSecure"/>
+                <allow send_destination="org.asamk.TextSecure"/>
+                <allow receive_sender="org.asamk.TextSecure"/>
+        </policy>
+
+        <policy context="default">
+                <allow send_destination="org.asamk.TextSecure"/>
+                <allow receive_sender="org.asamk.TextSecure"/>
+        </policy>
+</busconfig>
diff --git a/data/org.asamk.TextSecure.service b/data/org.asamk.TextSecure.service
new file mode 100644 (file)
index 0000000..a031626
--- /dev/null
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.asamk.TextSecure
+Exec=/bin/false
+SystemdService=dbus-org.asamk.TextSecure.service
diff --git a/data/textsecure.service b/data/textsecure.service
new file mode 100644 (file)
index 0000000..2ed892c
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Send secure messages to TextSecure/Signal clients
+
+[Service]
+Type=dbus
+ExecStart=%dir%/bin/textsecure-cli -u %number% daemon --system
+User=textsecure
+BusName=org.asamk.TextSecure
+
+[Install]
+Alias=dbus-org.asamk.TextSecure.service