diff --git a/kubernetes/docker-distribution/centos/files/docker-distribution.service b/kubernetes/docker-distribution/centos/files/docker-distribution.service index f2f1d4bbd..11e0f25c1 100644 --- a/kubernetes/docker-distribution/centos/files/docker-distribution.service +++ b/kubernetes/docker-distribution/centos/files/docker-distribution.service @@ -5,6 +5,8 @@ Description=v2 Registry server for Docker Type=simple ExecStart=/usr/bin/registry serve /etc/docker-distribution/registry/config.yml Restart=on-failure +ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/docker-distribution.pid' +ExecStopPost=/bin/rm -f /var/run/docker-distribution.pid [Install] WantedBy=multi-user.target