Answer the question
In order to leave comments, you need to log in
How to add a command to systemd?
I have service centrifugo.service
[Unit]
Description=Centrifugo real-time messaging server
Documentation=https://github.com/centrifugal/centrifugo
# start once the network and logging subsystems available
After=network.target syslog.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
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=centrifugo
[Install]
WantedBy=multi-user.target
Alias=centrifugo.service
[Unit]
Description=Centrifugo worker
[Service]
Restart=on-failure
ExecStart=/usr/bin/centrifugo -w --config="/etc/centrifugo/config.json"
[Install]
WantedBy=multi-user.target
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question