Systemd string escaping
If I run this command /bin/bash -c 'while true;do /usr/bin/etcdctl set my-container "{\"host\": \"1\", \"port\": $(/usr/bin/docker port my-container 5000 | cut -d":" -f2)}" --ttl 60;sleep 45;done' I get back from etcd what I expect {"host":"1", "port":49155} But if I put it in a systemd file ExecStart=/bin/bash -c 'while true;do /usr/bin/etcdctl set my-container "{\"host\": \"1\", \"port\": $(/usr/bin/docker port my-container 5000 | cut -d":" -f2)}" --ttl 60;sleep 45;done' I get back {host:1, port:49155} Any idea of why the escaping is different inside of the file? How can I fix it? Thanks!!