summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-02-09 18:01:40 +0100
committerKali Kaneko <kali@leap.se>2017-02-09 18:03:05 +0100
commitb6359ed68d611cfa11b11e0591eb6186351793bd (patch)
tree3301095ea8e9620770d4f6577736f9660e5f3482 /server
parent4ae57257fa2d40ceeba1558d995d3514e6f6d6fa (diff)
[pkg] add systemd service file to master
this is to ease the packaging flow used in some environments like Pixelated, that use a debian branch against different branches. - Resolves: #8762
Diffstat (limited to 'server')
-rw-r--r--server/pkg/soledad-server.service31
1 files changed, 31 insertions, 0 deletions
diff --git a/server/pkg/soledad-server.service b/server/pkg/soledad-server.service
new file mode 100644
index 00000000..ccd03b97
--- /dev/null
+++ b/server/pkg/soledad-server.service
@@ -0,0 +1,31 @@
+[Unit]
+Description=Soledad Server
+
+[Service]
+Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin
+Environment=CLASS=leap.soledad.server.resource.SoledadResource
+Environment=HTTPS_PORT=2424
+Environment=CERT_PATH=/etc/soledad/soledad-server.pem
+Environment=PRIVKEY_PATH=/etc/soledad/soledad-server.key
+Environment=HOME=/var/lib/soledad/
+Environment=SSL_METHOD=SSLv23_METHOD
+EnvironmentFile=-/etc/default/soledad
+
+ExecStart=/usr/bin/twistd \
+ --nodaemon \
+ --pidfile= \
+ --syslog \
+ --prefix=soledad-server \
+ web \
+ --class=${CLASS} \
+ --port=ssl:${HTTPS_PORT}:privateKey=${PRIVKEY_PATH}:certKey=${CERT_PATH}:sslmethod=${SSL_METHOD}
+
+WorkingDirectory=/var/lib/soledad/
+
+User=soledad
+Group=soledad
+
+Restart=always
+
+[Install]
+WantedBy=multi-user.target