about summary refs log tree commit homepage
path: root/examples/unicorn.socket
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-11-17 01:55:18 +0000
committerEric Wong <e@80x24.org>2015-11-17 21:41:10 +0000
commit6452e02d910a52c9c1206ecec800b910609da405 (patch)
tree4952d91f675d6ddf6d646180fcf93ea1c3521da4 /examples/unicorn.socket
parent2cf1b3df5d58c716ada873f0ae7803142e3da362 (diff)
downloadunicorn-6452e02d910a52c9c1206ecec800b910609da405.tar.gz
Since we have init scripts, we ought to have the equivalent for
systemd users who cannot upgrade via the normal SIGUSR2 mechanism;
but can use multiple services: "unicorn@1" + h"unicorn@2" to
accomplish the same thing.

Based on examples by Christos Trochalakis <yatiohi@ideopolis.gr>

ref:
http://bogomips.org/unicorn-public/20150708130821.GA1361@luke.ws.skroutz.gr/
Diffstat (limited to 'examples/unicorn.socket')
-rw-r--r--examples/unicorn.socket11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/unicorn.socket b/examples/unicorn.socket
new file mode 100644
index 0000000..7d5f773
--- /dev/null
+++ b/examples/unicorn.socket
@@ -0,0 +1,11 @@
+# ==> /etc/systemd/system/unicorn.socket <==
+[Unit]
+Description = unicorn sockets
+
+[Socket]
+ListenStream = 127.0.0.1:8080
+ListenStream = /tmp/path/to/.unicorn.sock
+Service = unicorn@1.service
+
+[Install]
+WantedBy = sockets.target