{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/2","id":73651219,"html_url":"https://github.com/dastrasmue/rpi-samba/pull/2","diff_url":"https://github.com/dastrasmue/rpi-samba/pull/2.diff","patch_url":"https://github.com/dastrasmue/rpi-samba/pull/2.patch","issue_url":"https://api.github.com/repos/dastrasmue/rpi-samba/issues/2","number":2,"state":"open","locked":false,"title":"Fix container death after smbd initializes.","user":{"login":"chuck-knox","id":8022749,"avatar_url":"https://avatars.githubusercontent.com/u/8022749?v=3","gravatar_id":"","url":"https://api.github.com/users/chuck-knox","html_url":"https://github.com/chuck-knox","followers_url":"https://api.github.com/users/chuck-knox/followers","following_url":"https://api.github.com/users/chuck-knox/following{/other_user}","gists_url":"https://api.github.com/users/chuck-knox/gists{/gist_id}","starred_url":"https://api.github.com/users/chuck-knox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuck-knox/subscriptions","organizations_url":"https://api.github.com/users/chuck-knox/orgs","repos_url":"https://api.github.com/users/chuck-knox/repos","events_url":"https://api.github.com/users/chuck-knox/events{/privacy}","received_events_url":"https://api.github.com/users/chuck-knox/received_events","type":"User","site_admin":false},"body":"I've seen this in a couple different rpi-samba images. Basically something like this happens:\r\n\r\n```bash\r\nCreating network \"networkshares_default\" with the default driver\r\nCreating networkshares_500hdd1_1\r\nAttaching to networkshares_500hdd1_1\r\n500hdd1_1  | Add user 'osmc' with password 'pwd' Added user osmc.\r\n500hdd1_1  | DONE\r\n500hdd1_1  | Add user 'chuck' with password 'pwd' Added user chuck.\r\n500hdd1_1  | DONE\r\n500hdd1_1  | Add share '500hdd1' path '/share/data' read+write for users: osmc chuck DONE\r\n500hdd1_1  | smbd version 4.2.11 started.\r\n500hdd1_1  | Copyright Andrew Tridgell and the Samba Team 1992-2014\r\n500hdd1_1  | STATUS=daemon 'smbd' finished starting up and ready to serve connections\r\nnetworkshares_500hdd1_1 exited with code 0\r\n```\r\nThis fixes the issue, somehow - thanks to this stack exchange article: http://unix.stackexchange.com/a/277119\r\n\r\nAfter building the image -- you can pull it via `docker pull charlesmknox/rpi-samba` if you want to test -- the container no longer exits with code 0:\r\n\r\n```bash\r\nCreating network \"networkshares_default\" with the default driver\r\nCreating networkshares_500hdd1_1\r\nAttaching to networkshares_500hdd1_1\r\n500hdd1_1  | Add user 'osmc' with password 'pwd' Added user osmc.\r\n500hdd1_1  | DONE\r\n500hdd1_1  | Add user 'chuck' with password 'pwd' Added user chuck.\r\n500hdd1_1  | DONE\r\n500hdd1_1  | Add share '500hdd1' path '/share/data' read+write for users: osmc chuck DONE\r\n500hdd1_1  | smbd version 4.2.11 started.\r\n500hdd1_1  | Copyright Andrew Tridgell and the Samba Team 1992-2014\r\n500hdd1_1  | STATUS=daemon 'smbd' finished starting up and ready to serve connections\r\n```\r\n\r\nThe fix is simply to append `< /dev/null` to the last line in `/run.sh`. Why does this work? I don't know. But it works, and on top of that, my share works too!","created_at":"2016-06-13T22:06:26Z","updated_at":"2016-06-13T22:06:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dastrasmue/rpi-samba/issues/2/comments","statuses_url":"https://api.github.com/repos/dastrasmue/rpi-samba/statuses/9cdff199257718d007b624de3a4e2651e28adc4f","head":{"label":"chuck-knox:fix-restarts","ref":"fix-restarts","sha":"9cdff199257718d007b624de3a4e2651e28adc4f","user":{"login":"chuck-knox","id":8022749,"avatar_url":"https://avatars.githubusercontent.com/u/8022749?v=3","gravatar_id":"","url":"https://api.github.com/users/chuck-knox","html_url":"https://github.com/chuck-knox","followers_url":"https://api.github.com/users/chuck-knox/followers","following_url":"https://api.github.com/users/chuck-knox/following{/other_user}","gists_url":"https://api.github.com/users/chuck-knox/gists{/gist_id}","starred_url":"https://api.github.com/users/chuck-knox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuck-knox/subscriptions","organizations_url":"https://api.github.com/users/chuck-knox/orgs","repos_url":"https://api.github.com/users/chuck-knox/repos","events_url":"https://api.github.com/users/chuck-knox/events{/privacy}","received_events_url":"https://api.github.com/users/chuck-knox/received_events","type":"User","site_admin":false},"repo":{"id":61070947,"name":"rpi-samba","full_name":"chuck-knox/rpi-samba","owner":{"login":"chuck-knox","id":8022749,"avatar_url":"https://avatars.githubusercontent.com/u/8022749?v=3","gravatar_id":"","url":"https://api.github.com/users/chuck-knox","html_url":"https://github.com/chuck-knox","followers_url":"https://api.github.com/users/chuck-knox/followers","following_url":"https://api.github.com/users/chuck-knox/following{/other_user}","gists_url":"https://api.github.com/users/chuck-knox/gists{/gist_id}","starred_url":"https://api.github.com/users/chuck-knox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuck-knox/subscriptions","organizations_url":"https://api.github.com/users/chuck-knox/orgs","repos_url":"https://api.github.com/users/chuck-knox/repos","events_url":"https://api.github.com/users/chuck-knox/events{/privacy}","received_events_url":"https://api.github.com/users/chuck-knox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chuck-knox/rpi-samba","description":"","fork":true,"url":"https://api.github.com/repos/chuck-knox/rpi-samba","forks_url":"https://api.github.com/repos/chuck-knox/rpi-samba/forks","keys_url":"https://api.github.com/repos/chuck-knox/rpi-samba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chuck-knox/rpi-samba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chuck-knox/rpi-samba/teams","hooks_url":"https://api.github.com/repos/chuck-knox/rpi-samba/hooks","issue_events_url":"https://api.github.com/repos/chuck-knox/rpi-samba/issues/events{/number}","events_url":"https://api.github.com/repos/chuck-knox/rpi-samba/events","assignees_url":"https://api.github.com/repos/chuck-knox/rpi-samba/assignees{/user}","branches_url":"https://api.github.com/repos/chuck-knox/rpi-samba/branches{/branch}","tags_url":"https://api.github.com/repos/chuck-knox/rpi-samba/tags","blobs_url":"https://api.github.com/repos/chuck-knox/rpi-samba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chuck-knox/rpi-samba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chuck-knox/rpi-samba/git/refs{/sha}","trees_url":"https://api.github.com/repos/chuck-knox/rpi-samba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chuck-knox/rpi-samba/statuses/{sha}","languages_url":"https://api.github.com/repos/chuck-knox/rpi-samba/languages","stargazers_url":"https://api.github.com/repos/chuck-knox/rpi-samba/stargazers","contributors_url":"https://api.github.com/repos/chuck-knox/rpi-samba/contributors","subscribers_url":"https://api.github.com/repos/chuck-knox/rpi-samba/subscribers","subscription_url":"https://api.github.com/repos/chuck-knox/rpi-samba/subscription","commits_url":"https://api.github.com/repos/chuck-knox/rpi-samba/commits{/sha}","git_commits_url":"https://api.github.com/repos/chuck-knox/rpi-samba/git/commits{/sha}","comments_url":"https://api.github.com/repos/chuck-knox/rpi-samba/comments{/number}","issue_comment_url":"https://api.github.com/repos/chuck-knox/rpi-samba/issues/comments{/number}","contents_url":"https://api.github.com/repos/chuck-knox/rpi-samba/contents/{+path}","compare_url":"https://api.github.com/repos/chuck-knox/rpi-samba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chuck-knox/rpi-samba/merges","archive_url":"https://api.github.com/repos/chuck-knox/rpi-samba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chuck-knox/rpi-samba/downloads","issues_url":"https://api.github.com/repos/chuck-knox/rpi-samba/issues{/number}","pulls_url":"https://api.github.com/repos/chuck-knox/rpi-samba/pulls{/number}","milestones_url":"https://api.github.com/repos/chuck-knox/rpi-samba/milestones{/number}","notifications_url":"https://api.github.com/repos/chuck-knox/rpi-samba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chuck-knox/rpi-samba/labels{/name}","releases_url":"https://api.github.com/repos/chuck-knox/rpi-samba/releases{/id}","deployments_url":"https://api.github.com/repos/chuck-knox/rpi-samba/deployments","created_at":"2016-06-13T21:28:12Z","updated_at":"2016-06-13T21:28:13Z","pushed_at":"2016-06-13T22:00:26Z","git_url":"git://github.com/chuck-knox/rpi-samba.git","ssh_url":"git@github.com:chuck-knox/rpi-samba.git","clone_url":"https://github.com/chuck-knox/rpi-samba.git","svn_url":"https://github.com/chuck-knox/rpi-samba","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dastrasmue:master","ref":"master","sha":"79851a801cdd6c1a99562cfe886aa3a2ac74b824","user":{"login":"dastrasmue","id":4160792,"avatar_url":"https://avatars.githubusercontent.com/u/4160792?v=3","gravatar_id":"","url":"https://api.github.com/users/dastrasmue","html_url":"https://github.com/dastrasmue","followers_url":"https://api.github.com/users/dastrasmue/followers","following_url":"https://api.github.com/users/dastrasmue/following{/other_user}","gists_url":"https://api.github.com/users/dastrasmue/gists{/gist_id}","starred_url":"https://api.github.com/users/dastrasmue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dastrasmue/subscriptions","organizations_url":"https://api.github.com/users/dastrasmue/orgs","repos_url":"https://api.github.com/users/dastrasmue/repos","events_url":"https://api.github.com/users/dastrasmue/events{/privacy}","received_events_url":"https://api.github.com/users/dastrasmue/received_events","type":"User","site_admin":false},"repo":{"id":48847811,"name":"rpi-samba","full_name":"dastrasmue/rpi-samba","owner":{"login":"dastrasmue","id":4160792,"avatar_url":"https://avatars.githubusercontent.com/u/4160792?v=3","gravatar_id":"","url":"https://api.github.com/users/dastrasmue","html_url":"https://github.com/dastrasmue","followers_url":"https://api.github.com/users/dastrasmue/followers","following_url":"https://api.github.com/users/dastrasmue/following{/other_user}","gists_url":"https://api.github.com/users/dastrasmue/gists{/gist_id}","starred_url":"https://api.github.com/users/dastrasmue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dastrasmue/subscriptions","organizations_url":"https://api.github.com/users/dastrasmue/orgs","repos_url":"https://api.github.com/users/dastrasmue/repos","events_url":"https://api.github.com/users/dastrasmue/events{/privacy}","received_events_url":"https://api.github.com/users/dastrasmue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dastrasmue/rpi-samba","description":"","fork":true,"url":"https://api.github.com/repos/dastrasmue/rpi-samba","forks_url":"https://api.github.com/repos/dastrasmue/rpi-samba/forks","keys_url":"https://api.github.com/repos/dastrasmue/rpi-samba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dastrasmue/rpi-samba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dastrasmue/rpi-samba/teams","hooks_url":"https://api.github.com/repos/dastrasmue/rpi-samba/hooks","issue_events_url":"https://api.github.com/repos/dastrasmue/rpi-samba/issues/events{/number}","events_url":"https://api.github.com/repos/dastrasmue/rpi-samba/events","assignees_url":"https://api.github.com/repos/dastrasmue/rpi-samba/assignees{/user}","branches_url":"https://api.github.com/repos/dastrasmue/rpi-samba/branches{/branch}","tags_url":"https://api.github.com/repos/dastrasmue/rpi-samba/tags","blobs_url":"https://api.github.com/repos/dastrasmue/rpi-samba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dastrasmue/rpi-samba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dastrasmue/rpi-samba/git/refs{/sha}","trees_url":"https://api.github.com/repos/dastrasmue/rpi-samba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dastrasmue/rpi-samba/statuses/{sha}","languages_url":"https://api.github.com/repos/dastrasmue/rpi-samba/languages","stargazers_url":"https://api.github.com/repos/dastrasmue/rpi-samba/stargazers","contributors_url":"https://api.github.com/repos/dastrasmue/rpi-samba/contributors","subscribers_url":"https://api.github.com/repos/dastrasmue/rpi-samba/subscribers","subscription_url":"https://api.github.com/repos/dastrasmue/rpi-samba/subscription","commits_url":"https://api.github.com/repos/dastrasmue/rpi-samba/commits{/sha}","git_commits_url":"https://api.github.com/repos/dastrasmue/rpi-samba/git/commits{/sha}","comments_url":"https://api.github.com/repos/dastrasmue/rpi-samba/comments{/number}","issue_comment_url":"https://api.github.com/repos/dastrasmue/rpi-samba/issues/comments{/number}","contents_url":"https://api.github.com/repos/dastrasmue/rpi-samba/contents/{+path}","compare_url":"https://api.github.com/repos/dastrasmue/rpi-samba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dastrasmue/rpi-samba/merges","archive_url":"https://api.github.com/repos/dastrasmue/rpi-samba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dastrasmue/rpi-samba/downloads","issues_url":"https://api.github.com/repos/dastrasmue/rpi-samba/issues{/number}","pulls_url":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls{/number}","milestones_url":"https://api.github.com/repos/dastrasmue/rpi-samba/milestones{/number}","notifications_url":"https://api.github.com/repos/dastrasmue/rpi-samba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dastrasmue/rpi-samba/labels{/name}","releases_url":"https://api.github.com/repos/dastrasmue/rpi-samba/releases{/id}","deployments_url":"https://api.github.com/repos/dastrasmue/rpi-samba/deployments","created_at":"2015-12-31T11:47:59Z","updated_at":"2016-01-15T00:05:24Z","pushed_at":"2016-04-16T23:00:15Z","git_url":"git://github.com/dastrasmue/rpi-samba.git","ssh_url":"git@github.com:dastrasmue/rpi-samba.git","clone_url":"https://github.com/dastrasmue/rpi-samba.git","svn_url":"https://github.com/dastrasmue/rpi-samba","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/2"},"html":{"href":"https://github.com/dastrasmue/rpi-samba/pull/2"},"issue":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/issues/2"},"comments":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dastrasmue/rpi-samba/statuses/9cdff199257718d007b624de3a4e2651e28adc4f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"chuck-knox"}}