Created
December 14, 2017 22:47
-
-
Save mdasilva/9896a8a9070b48236146077829a8eea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=consul server | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
User=consul | |
Group=consul | |
Restart=on-failure | |
PIDFile=/run/consul/consul.pid | |
Environment=GOMAXPROCS=2 | |
ExecStartPre=[ -f "/run/consul/consul.pid" ] && /bin/rm -f /run/consul/consul.pid | |
#ExecStartPre=/usr/local/bin/consul configtest -config-dir=/etc/consul.d/server | |
ExecStart=/usr/local/bin/consul agent -pid-file=/run/consul/consul.pid -config-dir=/etc/consul.d/server | |
ExecReload=/bin/kill -s HUP $MAINPID | |
KillSignal=SIGINT | |
TimeoutStopSec=5 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment