Created
June 24, 2018 20:24
-
-
Save marylly/a29ce19c2e89562f5b8904e9aacd8f52 to your computer and use it in GitHub Desktop.
Consul OpenRC 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
#!/sbin/openrc-run | |
depend() { | |
need localmount | |
after net | |
} | |
start() { | |
ebegin "Starting Consul" | |
start-stop-daemon --background --start --exec /go/bin/consul -- agent -server -config-file=/go/src/github.com/hashicorp/consul/consul.json | |
eend $? | |
} | |
stop() { | |
ebegin "Stopping Consul" | |
start-stop-daemon --stop --exec /go/bin/consul -- leave | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment