aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/consul/templates/consul_systemd.service.j2
blob: 8e1ef1310de91d6b50a768b01b14b1d7dd73c6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[Unit]
Description=Consul Service
Documentation=https://www.nomadproject.io/docs/
Wants=network-online.target
After=network-online.target

[Service]
# TODO: Decrease privilege
ExecReload=/bin/kill -SIGHUP $MAINPID
ExecStart={{ consul_bin_dir }}/consul agent -config-dir {{ consul_config_dir }}
KillSignal=SIGTERM
LimitNOFILE=infinity
LimitNPROC=infinity
Restart=on-failure
RestartSec=1
User=root
Group=root
Environment="GOMAXPROCS=2"

[Install]
WantedBy=multi-user.target