{"action":"closed","issue":{"url":"https://api.github.com/repos/garethr/garethr-docker/issues/230","labels_url":"https://api.github.com/repos/garethr/garethr-docker/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/garethr/garethr-docker/issues/230/comments","events_url":"https://api.github.com/repos/garethr/garethr-docker/issues/230/events","html_url":"https://github.com/garethr/garethr-docker/issues/230","id":69570132,"number":230,"title":"init.d scripts do not work on reboot","user":{"login":"pazoozooCH","id":2774395,"avatar_url":"https://avatars.githubusercontent.com/u/2774395?v=3","gravatar_id":"","url":"https://api.github.com/users/pazoozooCH","html_url":"https://github.com/pazoozooCH","followers_url":"https://api.github.com/users/pazoozooCH/followers","following_url":"https://api.github.com/users/pazoozooCH/following{/other_user}","gists_url":"https://api.github.com/users/pazoozooCH/gists{/gist_id}","starred_url":"https://api.github.com/users/pazoozooCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pazoozooCH/subscriptions","organizations_url":"https://api.github.com/users/pazoozooCH/orgs","repos_url":"https://api.github.com/users/pazoozooCH/repos","events_url":"https://api.github.com/users/pazoozooCH/events{/privacy}","received_events_url":"https://api.github.com/users/pazoozooCH/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-20T11:52:47Z","updated_at":"2015-05-24T19:02:24Z","closed_at":"2015-05-24T19:02:24Z","body":"There seems to be a conceptual problem with the init.d scripts (using version 3.5.0 of the module):\r\n\r\nThe start script will store a cid-file at /var/run. However, this is a temporary filesystem (at least with Ubuntu) that will be recreated at reboot. This means that the cid-files will be lost.\r\n\r\nThe start scripts now have an if-else that checks for the presence of the cid-file. On a reboot, this goes to the else-part that tries to execute docker run. This will fail with a duplicate name error if the container is named and has only been stopped, not removed (which is quite a common case imho).\r\n\r\nThe init scripts should be smart enough to check for a stopped (named) container, even if the cid-file doesn't exist."}}