summaryrefslogtreecommitdiff
path: root/pkg/server/soledad-server.service
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/server/soledad-server.service')
-rw-r--r--pkg/server/soledad-server.service31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkg/server/soledad-server.service b/pkg/server/soledad-server.service
new file mode 100644
index 00000000..30c4bf88
--- /dev/null
+++ b/pkg/server/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.entrypoint.SoledadEntrypoint
+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