aboutsummaryrefslogtreecommitdiffstats
path: root/testing/synapse/synapse.initd
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-01 17:47:40 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-08-05 09:25:31 -0300
commit1e8d91a75e69816000c301a24b01bf0436e4873b (patch)
tree8c26562863f7cc11f57a30d2fe827e4e2fe125b1 /testing/synapse/synapse.initd
parent10b99186fd6f57c06e68339f96069f0354db9d9f (diff)
downloadaports-1e8d91a75e69816000c301a24b01bf0436e4873b.tar.bz2
aports-1e8d91a75e69816000c301a24b01bf0436e4873b.tar.xz
testing/synapse: new aport
https://github.com/matrix-org/synapse Matrix reference homeserver
Diffstat (limited to 'testing/synapse/synapse.initd')
-rw-r--r--testing/synapse/synapse.initd23
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/synapse/synapse.initd b/testing/synapse/synapse.initd
new file mode 100644
index 0000000000..f5b46369f2
--- /dev/null
+++ b/testing/synapse/synapse.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+name="synapse"
+description="Daemon for Synapse, the Matrix reference homeserver"
+
+: ${command_user:="synapse:synapse"}
+: ${config:="/etc/synapse/homesever.yaml"}
+
+command="/usr/bin/python3"
+command_args="-m synapse.app.homeserver --config-path=$config $command_args"
+
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depends() {
+ need net
+}
+
+start_pre() {
+ # /var/lib/synapse needs to be owned by the synapse user and so does the config location
+ checkpath --directory --owner "$command_user" /var/lib/synapse
+ checkpath --file --owner "$command_user" $config
+}