{"action":"created","comment":{"url":"https://api.github.com/repos/axsh/openvnet/pulls/comments/28485821","id":28485821,"diff_hunk":"@@ -0,0 +1,12 @@\n+#!/bin/sh\n+set -e\n+\n+user=\"vnet-vnmgr\"\n+logfile=\"/var/log/openvnet/vnmgr.log\"\n+\n+if ! id \"$user\" > /dev/null 2>&1 ; then\n+    adduser --system --no-create-home --shell /bin/false \"$user\"\n+fi\n+\n+touch \"$logfile\"","path":"deployment/packagebuild/packages.d/vnet/openvnet-vnmgr/post-install","position":11,"original_position":11,"commit_id":"f9fd151bf5b2606e974ca2f2cac29251b8d04ad6","original_commit_id":"f9fd151bf5b2606e974ca2f2cac29251b8d04ad6","user":{"login":"unakatsuo","id":95236,"avatar_url":"https://avatars.githubusercontent.com/u/95236?v=3","gravatar_id":"","url":"https://api.github.com/users/unakatsuo","html_url":"https://github.com/unakatsuo","followers_url":"https://api.github.com/users/unakatsuo/followers","following_url":"https://api.github.com/users/unakatsuo/following{/other_user}","gists_url":"https://api.github.com/users/unakatsuo/gists{/gist_id}","starred_url":"https://api.github.com/users/unakatsuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unakatsuo/subscriptions","organizations_url":"https://api.github.com/users/unakatsuo/orgs","repos_url":"https://api.github.com/users/unakatsuo/repos","events_url":"https://api.github.com/users/unakatsuo/events{/privacy}","received_events_url":"https://api.github.com/users/unakatsuo/received_events","type":"User","site_admin":false},"body":"it may fail if the folder \"/var/log/openvnet/\" was missing. ","created_at":"2015-04-16T06:04:12Z","updated_at":"2015-04-16T06:04:12Z","html_url":"https://github.com/axsh/openvnet/pull/299#discussion_r28485821","pull_request_url":"https://api.github.com/repos/axsh/openvnet/pulls/299","_links":{"self":{"href":"https://api.github.com/repos/axsh/openvnet/pulls/comments/28485821"},"html":{"href":"https://github.com/axsh/openvnet/pull/299#discussion_r28485821"},"pull_request":{"href":"https://api.github.com/repos/axsh/openvnet/pulls/299"}}},"pull_request":{"url":"https://api.github.com/repos/axsh/openvnet/pulls/299","id":33335127,"html_url":"https://github.com/axsh/openvnet/pull/299","diff_url":"https://github.com/axsh/openvnet/pull/299.diff","patch_url":"https://github.com/axsh/openvnet/pull/299.patch","issue_url":"https://api.github.com/repos/axsh/openvnet/issues/299","number":299,"state":"open","locked":false,"title":"webapi and vnmgr services run with own user","user":{"login":"Mopster","id":155956,"avatar_url":"https://avatars.githubusercontent.com/u/155956?v=3","gravatar_id":"","url":"https://api.github.com/users/Mopster","html_url":"https://github.com/Mopster","followers_url":"https://api.github.com/users/Mopster/followers","following_url":"https://api.github.com/users/Mopster/following{/other_user}","gists_url":"https://api.github.com/users/Mopster/gists{/gist_id}","starred_url":"https://api.github.com/users/Mopster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mopster/subscriptions","organizations_url":"https://api.github.com/users/Mopster/orgs","repos_url":"https://api.github.com/users/Mopster/repos","events_url":"https://api.github.com/users/Mopster/events{/privacy}","received_events_url":"https://api.github.com/users/Mopster/received_events","type":"User","site_admin":false},"body":"The webapi and vnmgr have gotten their own user. The rpm creates the users and adds writing permissions to the log files. The upstart scripts start the service with the webapi and vnmgr user.","created_at":"2015-04-15T09:05:37Z","updated_at":"2015-04-16T06:04:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdff4dea1bf45a48aa7e1da914ac16c7b5f1c30b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/axsh/openvnet/pulls/299/commits","review_comments_url":"https://api.github.com/repos/axsh/openvnet/pulls/299/comments","review_comment_url":"https://api.github.com/repos/axsh/openvnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/axsh/openvnet/issues/299/comments","statuses_url":"https://api.github.com/repos/axsh/openvnet/statuses/f9fd151bf5b2606e974ca2f2cac29251b8d04ad6","head":{"label":"axsh:services-run-as-user","ref":"services-run-as-user","sha":"f9fd151bf5b2606e974ca2f2cac29251b8d04ad6","user":{"login":"axsh","id":95230,"avatar_url":"https://avatars.githubusercontent.com/u/95230?v=3","gravatar_id":"","url":"https://api.github.com/users/axsh","html_url":"https://github.com/axsh","followers_url":"https://api.github.com/users/axsh/followers","following_url":"https://api.github.com/users/axsh/following{/other_user}","gists_url":"https://api.github.com/users/axsh/gists{/gist_id}","starred_url":"https://api.github.com/users/axsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axsh/subscriptions","organizations_url":"https://api.github.com/users/axsh/orgs","repos_url":"https://api.github.com/users/axsh/repos","events_url":"https://api.github.com/users/axsh/events{/privacy}","received_events_url":"https://api.github.com/users/axsh/received_events","type":"Organization","site_admin":false},"repo":{"id":9443209,"name":"openvnet","full_name":"axsh/openvnet","owner":{"login":"axsh","id":95230,"avatar_url":"https://avatars.githubusercontent.com/u/95230?v=3","gravatar_id":"","url":"https://api.github.com/users/axsh","html_url":"https://github.com/axsh","followers_url":"https://api.github.com/users/axsh/followers","following_url":"https://api.github.com/users/axsh/following{/other_user}","gists_url":"https://api.github.com/users/axsh/gists{/gist_id}","starred_url":"https://api.github.com/users/axsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axsh/subscriptions","organizations_url":"https://api.github.com/users/axsh/orgs","repos_url":"https://api.github.com/users/axsh/repos","events_url":"https://api.github.com/users/axsh/events{/privacy}","received_events_url":"https://api.github.com/users/axsh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axsh/openvnet","description":"Data Center Level Virtual Network Toolkit based on Edge Overlaid Network using OpenFlow 1.3.","fork":false,"url":"https://api.github.com/repos/axsh/openvnet","forks_url":"https://api.github.com/repos/axsh/openvnet/forks","keys_url":"https://api.github.com/repos/axsh/openvnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axsh/openvnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axsh/openvnet/teams","hooks_url":"https://api.github.com/repos/axsh/openvnet/hooks","issue_events_url":"https://api.github.com/repos/axsh/openvnet/issues/events{/number}","events_url":"https://api.github.com/repos/axsh/openvnet/events","assignees_url":"https://api.github.com/repos/axsh/openvnet/assignees{/user}","branches_url":"https://api.github.com/repos/axsh/openvnet/branches{/branch}","tags_url":"https://api.github.com/repos/axsh/openvnet/tags","blobs_url":"https://api.github.com/repos/axsh/openvnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axsh/openvnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axsh/openvnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/axsh/openvnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axsh/openvnet/statuses/{sha}","languages_url":"https://api.github.com/repos/axsh/openvnet/languages","stargazers_url":"https://api.github.com/repos/axsh/openvnet/stargazers","contributors_url":"https://api.github.com/repos/axsh/openvnet/contributors","subscribers_url":"https://api.github.com/repos/axsh/openvnet/subscribers","subscription_url":"https://api.github.com/repos/axsh/openvnet/subscription","commits_url":"https://api.github.com/repos/axsh/openvnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/axsh/openvnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/axsh/openvnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/axsh/openvnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/axsh/openvnet/contents/{+path}","compare_url":"https://api.github.com/repos/axsh/openvnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axsh/openvnet/merges","archive_url":"https://api.github.com/repos/axsh/openvnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axsh/openvnet/downloads","issues_url":"https://api.github.com/repos/axsh/openvnet/issues{/number}","pulls_url":"https://api.github.com/repos/axsh/openvnet/pulls{/number}","milestones_url":"https://api.github.com/repos/axsh/openvnet/milestones{/number}","notifications_url":"https://api.github.com/repos/axsh/openvnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axsh/openvnet/labels{/name}","releases_url":"https://api.github.com/repos/axsh/openvnet/releases{/id}","created_at":"2013-04-15T07:36:18Z","updated_at":"2015-04-03T09:07:55Z","pushed_at":"2015-04-15T09:05:37Z","git_url":"git://github.com/axsh/openvnet.git","ssh_url":"git@github.com:axsh/openvnet.git","clone_url":"https://github.com/axsh/openvnet.git","svn_url":"https://github.com/axsh/openvnet","homepage":"http://openvnet.org","size":8812,"stargazers_count":39,"watchers_count":39,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":32,"forks":4,"open_issues":32,"watchers":39,"default_branch":"master"}},"base":{"label":"axsh:develop","ref":"develop","sha":"dd202b9fe10c5ad4266969cca9e102f8c4dcf040","user":{"login":"axsh","id":95230,"avatar_url":"https://avatars.githubusercontent.com/u/95230?v=3","gravatar_id":"","url":"https://api.github.com/users/axsh","html_url":"https://github.com/axsh","followers_url":"https://api.github.com/users/axsh/followers","following_url":"https://api.github.com/users/axsh/following{/other_user}","gists_url":"https://api.github.com/users/axsh/gists{/gist_id}","starred_url":"https://api.github.com/users/axsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axsh/subscriptions","organizations_url":"https://api.github.com/users/axsh/orgs","repos_url":"https://api.github.com/users/axsh/repos","events_url":"https://api.github.com/users/axsh/events{/privacy}","received_events_url":"https://api.github.com/users/axsh/received_events","type":"Organization","site_admin":false},"repo":{"id":9443209,"name":"openvnet","full_name":"axsh/openvnet","owner":{"login":"axsh","id":95230,"avatar_url":"https://avatars.githubusercontent.com/u/95230?v=3","gravatar_id":"","url":"https://api.github.com/users/axsh","html_url":"https://github.com/axsh","followers_url":"https://api.github.com/users/axsh/followers","following_url":"https://api.github.com/users/axsh/following{/other_user}","gists_url":"https://api.github.com/users/axsh/gists{/gist_id}","starred_url":"https://api.github.com/users/axsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axsh/subscriptions","organizations_url":"https://api.github.com/users/axsh/orgs","repos_url":"https://api.github.com/users/axsh/repos","events_url":"https://api.github.com/users/axsh/events{/privacy}","received_events_url":"https://api.github.com/users/axsh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/axsh/openvnet","description":"Data Center Level Virtual Network Toolkit based on Edge Overlaid Network using OpenFlow 1.3.","fork":false,"url":"https://api.github.com/repos/axsh/openvnet","forks_url":"https://api.github.com/repos/axsh/openvnet/forks","keys_url":"https://api.github.com/repos/axsh/openvnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axsh/openvnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axsh/openvnet/teams","hooks_url":"https://api.github.com/repos/axsh/openvnet/hooks","issue_events_url":"https://api.github.com/repos/axsh/openvnet/issues/events{/number}","events_url":"https://api.github.com/repos/axsh/openvnet/events","assignees_url":"https://api.github.com/repos/axsh/openvnet/assignees{/user}","branches_url":"https://api.github.com/repos/axsh/openvnet/branches{/branch}","tags_url":"https://api.github.com/repos/axsh/openvnet/tags","blobs_url":"https://api.github.com/repos/axsh/openvnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axsh/openvnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axsh/openvnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/axsh/openvnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axsh/openvnet/statuses/{sha}","languages_url":"https://api.github.com/repos/axsh/openvnet/languages","stargazers_url":"https://api.github.com/repos/axsh/openvnet/stargazers","contributors_url":"https://api.github.com/repos/axsh/openvnet/contributors","subscribers_url":"https://api.github.com/repos/axsh/openvnet/subscribers","subscription_url":"https://api.github.com/repos/axsh/openvnet/subscription","commits_url":"https://api.github.com/repos/axsh/openvnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/axsh/openvnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/axsh/openvnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/axsh/openvnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/axsh/openvnet/contents/{+path}","compare_url":"https://api.github.com/repos/axsh/openvnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axsh/openvnet/merges","archive_url":"https://api.github.com/repos/axsh/openvnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axsh/openvnet/downloads","issues_url":"https://api.github.com/repos/axsh/openvnet/issues{/number}","pulls_url":"https://api.github.com/repos/axsh/openvnet/pulls{/number}","milestones_url":"https://api.github.com/repos/axsh/openvnet/milestones{/number}","notifications_url":"https://api.github.com/repos/axsh/openvnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axsh/openvnet/labels{/name}","releases_url":"https://api.github.com/repos/axsh/openvnet/releases{/id}","created_at":"2013-04-15T07:36:18Z","updated_at":"2015-04-03T09:07:55Z","pushed_at":"2015-04-15T09:05:37Z","git_url":"git://github.com/axsh/openvnet.git","ssh_url":"git@github.com:axsh/openvnet.git","clone_url":"https://github.com/axsh/openvnet.git","svn_url":"https://github.com/axsh/openvnet","homepage":"http://openvnet.org","size":8812,"stargazers_count":39,"watchers_count":39,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":32,"forks":4,"open_issues":32,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/axsh/openvnet/pulls/299"},"html":{"href":"https://github.com/axsh/openvnet/pull/299"},"issue":{"href":"https://api.github.com/repos/axsh/openvnet/issues/299"},"comments":{"href":"https://api.github.com/repos/axsh/openvnet/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/axsh/openvnet/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/axsh/openvnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/axsh/openvnet/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/axsh/openvnet/statuses/f9fd151bf5b2606e974ca2f2cac29251b8d04ad6"}}}}