properly detect already running instances

docker ps|grep $cid .. fails due to grepping the non-truncated CID against 'docker ps' which truncates by default. 

Without this, calling: /etc/init.d/docker-[container] start while the container is already running, causes another instance of the container to start.