Skip to content

Instantly share code, notes, and snippets.

@roblayton roblayton/hello-01.service
Last active Aug 29, 2015

Embed
What would you like to do?
An example hello world service for Systemd
[Unit]
Description="Hello Service 01"
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill busybox1
ExecStartPre=-/usr/bin/docker rm busybox1
ExecStartPre=-/usr/bin/docker pull busybox
ExecStart=/usr/bin/docker run --name busybox1 busybox /bin/sh -c "while true; do echo Hello World 1; sleep 1; done"
ExecStartPost=/usr/bin/etcdctl set /domains/hello-01/%H:%i running
ExecStop=/usr/bin/docker stop busybox1
ExecStopPost=/usr/bin/etcdctl rm /domains/hello-01/%H:%i
[X-Fleet]
Conflicts=hello*.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.