From 6452e02d910a52c9c1206ecec800b910609da405 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Nov 2015 01:55:18 +0000 Subject: examples: add systemd socket and service files 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 ref: http://bogomips.org/unicorn-public/20150708130821.GA1361@luke.ws.skroutz.gr/ --- examples/unicorn.socket | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/unicorn.socket (limited to 'examples/unicorn.socket') 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 -- cgit v1.2.3-24-ge0c7