Skip to content

Instantly share code, notes, and snippets.

@lcarstensen
Created May 15, 2015 19:34
Show Gist options
  • Save lcarstensen/0bae93f196f06232074f to your computer and use it in GitHub Desktop.
Save lcarstensen/0bae93f196f06232074f to your computer and use it in GitHub Desktop.
gareth/garethr-docker generated systemd service file that doesn't work due to spaces in SERVERLIST environment variable
# This file is managed by Puppet and local changes
# may be overwritten
[Unit]
Description=Daemon for zookeeper
After=docker.service
Requires=docker.service
[Service]
Restart=on-failure
StartLimitInterval=20
StartLimitBurst=5
TimeoutStartSec=0
Environment="HOME=/root"
ExecStartPre=-/usr/bin/docker kill zookeeper
ExecStartPre=-/usr/bin/docker rm zookeeper
ExecStart=/usr/bin/docker run \
--net bridge -m 0b -e CLIENTPORT=2181 -e MYID=2 -e SERVERLIST='zoo001.example.com:2888:3888 zoo002.example.com:2888:3888 zoo003.example.com:2888:3888' -p 2181:2181 -p 2888:2888 -p 3888:3888 \
--name zookeeper \
my/zookeeper \
\
ExecStop=-/usr/bin/docker stop zookeeper
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment