Skip to content

Instantly share code, notes, and snippets.

@VinodVerma7584
Forked from yunano/consul.service
Created May 16, 2017 07:31
Show Gist options
  • Save VinodVerma7584/952f287feab25e0b9a9de92c3ee06857 to your computer and use it in GitHub Desktop.
Save VinodVerma7584/952f287feab25e0b9a9de92c3ee06857 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=SIGINT
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment