Created
May 1, 2015 15:52
-
-
Save yunano/c27eb679a29ab70178ca to your computer and use it in GitHub Desktop.
/etc/systemd/system/consul.service
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 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 |
I see you configured $OPTIONS as a cli argument. How do you actually configure that in the environmental file? I see there's a json structure that consul might expect, but this has nothing to do with it, I gather?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just as a reference, as I've also come across this topic, this comes from the official package installation (of course it needs to be adapted, according to the needs, but it should help anyway):