Created
August 9, 2014 23:49
-
-
Save groob/d77a713a1bd1427f73bd to your computer and use it in GitHub Desktop.
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=Register for Munki service | |
BindsTo=munki@%i.service | |
After=munki@%i.service | |
[Service] | |
EnvironmentFile=/etc/environment | |
RemainAfterExit=yes | |
ExecStart=/bin/sh -c "/bin/etcdctl set \"/vulcand/upstreams/munki.whitbyschool.net/endpoints/munki-register@%i.service\" http://$COREOS_PUBLIC_IPV4:%i; \ | |
/bin/etcdctl set \"/vulcand/hosts/munki.whitbyschool.net/locations/home/path\" '/.*'; \ | |
/bin/etcdctl set \"/vulcand/hosts/munki/locations/home/path\" '/.*'; \ | |
/bin/etcdctl set /vulcand/hosts/munki.whitbyschool.net/locations/home/upstream munki.whitbyschool.net; \ | |
/bin/etcdctl set /vulcand/hosts/munki/locations/home/upstream munki.whitbyschool.net" | |
ExecStop=/bin/sh -c "/bin/etcdctl rm /vulcand/upstreams/munki.whitbyschool.net/endpoints/munki-register@%i.service" | |
[X-Fleet] | |
X-ConditionMachineOf=munki@%i.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment