Last active
June 8, 2017 07:04
-
-
Save umardx/5dfd8e706ed1f5ad96f5a708b754bd16 to your computer and use it in GitHub Desktop.
Systemd for consul: /etc/systemd/system/consul.service
This file contains hidden or 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 Agent | |
| Requires=network-online.target | |
| After=network-online.target | |
| [Service] | |
| Restart=on-failure | |
| PIDFile=/run/consul.pid | |
| ExecStartPre=[ -f "/run/consul.pid" ] && /usr/bin/rm -f /run/consul.pid | |
| ExecStartPre=/usr/local/bin/consul configtest -config-dir=/etc/consul.d/server | |
| ExecStart=/usr/local/bin/consul agent -config-dir=/etc/consul.d/server -pid-file=/run/consul.pid | |
| ExecReload=/bin/kill -HUP $MAINPID | |
| KillSignal=SIGINT | |
| TimeoutStopSec=10 | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment