test server example systemd service file
authorAndy Green <andy.green@linaro.org>
Fri, 19 Feb 2016 04:46:36 +0000 (12:46 +0800)
committerAndy Green <andy.green@linaro.org>
Fri, 19 Feb 2016 04:46:36 +0000 (12:46 +0800)
Make sure you have daemonization enabled to use this

make .. -DLWS_WITHOUT_DAEMONIZE=0

Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/libwebsockets-test-server.service [new file with mode: 0644]

diff --git a/test-server/libwebsockets-test-server.service b/test-server/libwebsockets-test-server.service
new file mode 100644 (file)
index 0000000..77034c0
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=Libwebsockets test server
+After=syslog.target
+
+[Service]
+ExecStart=/usr/local/bin/libwebsockets-test-server --ssl -C /etc/pki/tls/certs/libwebsockets.org.crt -K /etc/pki/tls/private/libwebsockets.org.key -A /etc/pki/tls/certs/libwebsockets.org.cer  --port 7681 -u 99 -g 99 --daemonize
+Type=forking
+PIDFile=/tmp/.lwsts-lock
+
+[Install]
+WantedBy=multi-user.target
+