github.com/didip/deis@v1.4.1/deisctl/units/deis-store-monitor.service (about) 1 [Unit] 2 Description=deis-store-monitor 3 4 [Service] 5 EnvironmentFile=/etc/environment 6 TimeoutStartSec=20m 7 ExecStartPre=/bin/sh -c "docker inspect deis-store-monitor-data >/dev/null 2>&1 || docker run --name deis-store-monitor-data -v /etc/ceph -v /var/lib/ceph/mon ubuntu-debootstrap:14.04 /bin/true" 8 ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/store-monitor` && docker history $IMAGE >/dev/null 2>&1 || docker pull $IMAGE" 9 ExecStartPre=/bin/sh -c "etcdctl set /deis/store/hosts/$COREOS_PRIVATE_IPV4 `hostname` >/dev/null" 10 ExecStartPre=/bin/sh -c "docker inspect deis-store-monitor >/dev/null 2>&1 && docker rm -f deis-store-monitor >/dev/null 2>&1 || true" 11 ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/store-monitor` && docker run --name deis-store-monitor --rm --volumes-from=deis-store-monitor-data -e HOST=$COREOS_PRIVATE_IPV4 -p 6789 --net host $IMAGE" 12 ExecStopPost=-/usr/bin/docker rm -f deis-store-monitor 13 Restart=on-failure 14 RestartSec=5 15 16 [Install] 17 WantedBy=multi-user.target 18 19 [X-Fleet] 20 Global=true