Skip to content

Instantly share code, notes, and snippets.

@jgworks
Forked from yunano/consul.service
Created December 20, 2016 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgworks/304f19c12abc975545057252b23f4bb3 to your computer and use it in GitHub Desktop.
Save jgworks/304f19c12abc975545057252b23f4bb3 to your computer and use it in GitHub Desktop.
/etc/systemd/system/consul.service
[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/sbin/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