Skip to content

Instantly share code, notes, and snippets.

@therandomsecurityguy
Last active June 22, 2017 16:13
Show Gist options
  • Save therandomsecurityguy/9fb7c113bf3203fd3ad036b9d80597ef to your computer and use it in GitHub Desktop.
Save therandomsecurityguy/9fb7c113bf3203fd3ad036b9d80597ef to your computer and use it in GitHub Desktop.
Consul service for systemd
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=-/etc/sysconfig/consul
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/local/bin/consul agent $OPTIONS -config-dir=/etc/consul.d
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment