summarylogtreecommitdiffstats
path: root/centrifugo.service
diff options
context:
space:
mode:
Diffstat (limited to 'centrifugo.service')
-rw-r--r--centrifugo.service23
1 files changed, 23 insertions, 0 deletions
diff --git a/centrifugo.service b/centrifugo.service
new file mode 100644
index 000000000000..65d0759074a3
--- /dev/null
+++ b/centrifugo.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=Centrifugo real-time messaging server
+Documentation=https://github.com/centrifugal/centrifugo
+After=network.target
+
+[Service]
+User=centrifugo
+Group=centrifugo
+LimitNOFILE=65536
+Environment="CONFIG=/etc/centrifugo/config.json"
+EnvironmentFile=/etc/default/centrifugo
+ExecStartPre=/usr/bin/centrifugo checkconfig -c $CONFIG
+ExecStart=/usr/bin/centrifugo -c $CONFIG $CENTRIFUGO_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStop=/bin/kill -SIGTERM $MAINPID
+TimeoutStopSec=10
+KillMode=control-group
+RestartSec=1
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+Alias=centrifugo.service