mirror of
https://github.com/hanzomsg/nats-server.git
synced 2026-10-30 20:27:34 +00:00
24 lines
591 B
Desktop File
24 lines
591 B
Desktop File
[Unit]
|
|
Description=NATS Server
|
|
After=network-online.target ntp.service
|
|
|
|
[Service]
|
|
PrivateTmp=true
|
|
Type=simple
|
|
ExecStart=/usr/sbin/nats-server -c /etc/nats-server.conf
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
|
|
|
# The nats-server uses SIGUSR2 to trigger Lame Duck Mode (LDM) shutdown
|
|
# https://docs.nats.io/running-a-nats-service/nats_admin/lame_duck_mode
|
|
ExecStop=/bin/kill -s SIGUSR2 $MAINPID
|
|
|
|
# This should be `lame_duck_duration` + some buffer to finish the shutdown.
|
|
# By default, `lame_duck_duration` is 2 mins.
|
|
TimeoutStopSec=150
|
|
|
|
User=nats
|
|
Group=nats
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|