{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/comments/76085661","id":76085661,"diff_hunk":"@@ -12,37 +10,156 @@\n # Description:       RackHD on-taskgraph service\n ### END INIT INFO\n \n-DESC=\"on-taskgraph\"\n+NAME=\"on-taskgraph\"\n+USER=\"root\"\n+APP_DIR=\"/var/renasar/$NAME\"\n+NODE_APP=\"index.js\"\n+PID_DIR=\"/var/run\"\n+PID_FILE=\"$PID_DIR/$NAME.pid\"\n+LOG_DIR=\"/var/log/rackhd\"\n+LOG_FILE=\"$LOG_DIR/$NAME.log\"\n+NODE_EXEC=$(which node)\n+\n+USAGE=\"Usage: $0 {start|stop|restart|status} [--force]\"\n+FORCE_OP=false\n+RESTART=false\n+\n+pid_file_exists() {\n+    [ -f \"$PID_FILE\" ]\n+}\n+\n+get_pid() {\n+    echo \"$(cat \"$PID_FILE\")\"\n+}\n+\n+is_running() {\n+    PID=$(get_pid)\n+    ! [ -z \"$(ps aux | awk '{print $2}' | grep \"^$PID$\")\" ]\n+}\n+\n+start_it() {\n+    if [ ! -d $PID_DIR ]; then mkdir -p \"$PID_DIR\";  fi\n+    chown $USER:$USER \"$PID_DIR\"","path":"debian/on-taskgraph.init","position":42,"original_position":42,"commit_id":"910baeca217e61841117c472cc42d702255ea468","original_commit_id":"910baeca217e61841117c472cc42d702255ea468","user":{"login":"ytjohn","id":163156,"avatar_url":"https://avatars.githubusercontent.com/u/163156?v=3","gravatar_id":"","url":"https://api.github.com/users/ytjohn","html_url":"https://github.com/ytjohn","followers_url":"https://api.github.com/users/ytjohn/followers","following_url":"https://api.github.com/users/ytjohn/following{/other_user}","gists_url":"https://api.github.com/users/ytjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/ytjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytjohn/subscriptions","organizations_url":"https://api.github.com/users/ytjohn/orgs","repos_url":"https://api.github.com/users/ytjohn/repos","events_url":"https://api.github.com/users/ytjohn/events{/privacy}","received_events_url":"https://api.github.com/users/ytjohn/received_events","type":"User","site_admin":false},"body":"Good point. Will adjust.","created_at":"2016-08-24T15:58:45Z","updated_at":"2016-08-24T15:58:45Z","html_url":"https://github.com/RackHD/on-taskgraph/pull/156#discussion_r76085661","pull_request_url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/comments/76085661"},"html":{"href":"https://github.com/RackHD/on-taskgraph/pull/156#discussion_r76085661"},"pull_request":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156","id":81022478,"html_url":"https://github.com/RackHD/on-taskgraph/pull/156","diff_url":"https://github.com/RackHD/on-taskgraph/pull/156.diff","patch_url":"https://github.com/RackHD/on-taskgraph/pull/156.patch","issue_url":"https://api.github.com/repos/RackHD/on-taskgraph/issues/156","number":156,"state":"open","locked":false,"title":"Better init script","user":{"login":"ytjohn","id":163156,"avatar_url":"https://avatars.githubusercontent.com/u/163156?v=3","gravatar_id":"","url":"https://api.github.com/users/ytjohn","html_url":"https://github.com/ytjohn","followers_url":"https://api.github.com/users/ytjohn/followers","following_url":"https://api.github.com/users/ytjohn/following{/other_user}","gists_url":"https://api.github.com/users/ytjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/ytjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytjohn/subscriptions","organizations_url":"https://api.github.com/users/ytjohn/orgs","repos_url":"https://api.github.com/users/ytjohn/repos","events_url":"https://api.github.com/users/ytjohn/events{/privacy}","received_events_url":"https://api.github.com/users/ytjohn/received_events","type":"User","site_admin":false},"body":" - enable start/stop/restart and pid monitoring\r\n - put logs in /var/log/rackhd\r\n\r\nhttps://github.com/RackHD/on-http/issues/416","created_at":"2016-08-11T20:11:34Z","updated_at":"2016-08-24T15:58:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8962de46fcb2b60f0b38842f012c24f323679c6e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156/commits","review_comments_url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156/comments","review_comment_url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/on-taskgraph/issues/156/comments","statuses_url":"https://api.github.com/repos/RackHD/on-taskgraph/statuses/910baeca217e61841117c472cc42d702255ea468","head":{"label":"ytjohn:init-2","ref":"init-2","sha":"910baeca217e61841117c472cc42d702255ea468","user":{"login":"ytjohn","id":163156,"avatar_url":"https://avatars.githubusercontent.com/u/163156?v=3","gravatar_id":"","url":"https://api.github.com/users/ytjohn","html_url":"https://github.com/ytjohn","followers_url":"https://api.github.com/users/ytjohn/followers","following_url":"https://api.github.com/users/ytjohn/following{/other_user}","gists_url":"https://api.github.com/users/ytjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/ytjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytjohn/subscriptions","organizations_url":"https://api.github.com/users/ytjohn/orgs","repos_url":"https://api.github.com/users/ytjohn/repos","events_url":"https://api.github.com/users/ytjohn/events{/privacy}","received_events_url":"https://api.github.com/users/ytjohn/received_events","type":"User","site_admin":false},"repo":{"id":54946574,"name":"on-taskgraph","full_name":"ytjohn/on-taskgraph","owner":{"login":"ytjohn","id":163156,"avatar_url":"https://avatars.githubusercontent.com/u/163156?v=3","gravatar_id":"","url":"https://api.github.com/users/ytjohn","html_url":"https://github.com/ytjohn","followers_url":"https://api.github.com/users/ytjohn/followers","following_url":"https://api.github.com/users/ytjohn/following{/other_user}","gists_url":"https://api.github.com/users/ytjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/ytjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytjohn/subscriptions","organizations_url":"https://api.github.com/users/ytjohn/orgs","repos_url":"https://api.github.com/users/ytjohn/repos","events_url":"https://api.github.com/users/ytjohn/events{/privacy}","received_events_url":"https://api.github.com/users/ytjohn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ytjohn/on-taskgraph","description":"","fork":true,"url":"https://api.github.com/repos/ytjohn/on-taskgraph","forks_url":"https://api.github.com/repos/ytjohn/on-taskgraph/forks","keys_url":"https://api.github.com/repos/ytjohn/on-taskgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ytjohn/on-taskgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ytjohn/on-taskgraph/teams","hooks_url":"https://api.github.com/repos/ytjohn/on-taskgraph/hooks","issue_events_url":"https://api.github.com/repos/ytjohn/on-taskgraph/issues/events{/number}","events_url":"https://api.github.com/repos/ytjohn/on-taskgraph/events","assignees_url":"https://api.github.com/repos/ytjohn/on-taskgraph/assignees{/user}","branches_url":"https://api.github.com/repos/ytjohn/on-taskgraph/branches{/branch}","tags_url":"https://api.github.com/repos/ytjohn/on-taskgraph/tags","blobs_url":"https://api.github.com/repos/ytjohn/on-taskgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ytjohn/on-taskgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ytjohn/on-taskgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ytjohn/on-taskgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ytjohn/on-taskgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/ytjohn/on-taskgraph/languages","stargazers_url":"https://api.github.com/repos/ytjohn/on-taskgraph/stargazers","contributors_url":"https://api.github.com/repos/ytjohn/on-taskgraph/contributors","subscribers_url":"https://api.github.com/repos/ytjohn/on-taskgraph/subscribers","subscription_url":"https://api.github.com/repos/ytjohn/on-taskgraph/subscription","commits_url":"https://api.github.com/repos/ytjohn/on-taskgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ytjohn/on-taskgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ytjohn/on-taskgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ytjohn/on-taskgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ytjohn/on-taskgraph/contents/{+path}","compare_url":"https://api.github.com/repos/ytjohn/on-taskgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ytjohn/on-taskgraph/merges","archive_url":"https://api.github.com/repos/ytjohn/on-taskgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ytjohn/on-taskgraph/downloads","issues_url":"https://api.github.com/repos/ytjohn/on-taskgraph/issues{/number}","pulls_url":"https://api.github.com/repos/ytjohn/on-taskgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/ytjohn/on-taskgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/ytjohn/on-taskgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ytjohn/on-taskgraph/labels{/name}","releases_url":"https://api.github.com/repos/ytjohn/on-taskgraph/releases{/id}","deployments_url":"https://api.github.com/repos/ytjohn/on-taskgraph/deployments","created_at":"2016-03-29T04:47:46Z","updated_at":"2016-03-29T04:47:47Z","pushed_at":"2016-08-12T20:32:26Z","git_url":"git://github.com/ytjohn/on-taskgraph.git","ssh_url":"git@github.com:ytjohn/on-taskgraph.git","clone_url":"https://github.com/ytjohn/on-taskgraph.git","svn_url":"https://github.com/ytjohn/on-taskgraph","homepage":null,"size":570,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"RackHD:master","ref":"master","sha":"47aec83ee640b4ad4d89f1babb3d50cf9610f368","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"repo":{"id":41690093,"name":"on-taskgraph","full_name":"RackHD/on-taskgraph","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RackHD/on-taskgraph","description":"","fork":false,"url":"https://api.github.com/repos/RackHD/on-taskgraph","forks_url":"https://api.github.com/repos/RackHD/on-taskgraph/forks","keys_url":"https://api.github.com/repos/RackHD/on-taskgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/on-taskgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/on-taskgraph/teams","hooks_url":"https://api.github.com/repos/RackHD/on-taskgraph/hooks","issue_events_url":"https://api.github.com/repos/RackHD/on-taskgraph/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/on-taskgraph/events","assignees_url":"https://api.github.com/repos/RackHD/on-taskgraph/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/on-taskgraph/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/on-taskgraph/tags","blobs_url":"https://api.github.com/repos/RackHD/on-taskgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/on-taskgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/on-taskgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/on-taskgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/on-taskgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/on-taskgraph/languages","stargazers_url":"https://api.github.com/repos/RackHD/on-taskgraph/stargazers","contributors_url":"https://api.github.com/repos/RackHD/on-taskgraph/contributors","subscribers_url":"https://api.github.com/repos/RackHD/on-taskgraph/subscribers","subscription_url":"https://api.github.com/repos/RackHD/on-taskgraph/subscription","commits_url":"https://api.github.com/repos/RackHD/on-taskgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/on-taskgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/on-taskgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/on-taskgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/on-taskgraph/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/on-taskgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/on-taskgraph/merges","archive_url":"https://api.github.com/repos/RackHD/on-taskgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/on-taskgraph/downloads","issues_url":"https://api.github.com/repos/RackHD/on-taskgraph/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/on-taskgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/on-taskgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/on-taskgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/on-taskgraph/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/on-taskgraph/releases{/id}","deployments_url":"https://api.github.com/repos/RackHD/on-taskgraph/deployments","created_at":"2015-08-31T17:29:25Z","updated_at":"2016-02-10T20:51:29Z","pushed_at":"2016-08-23T21:39:01Z","git_url":"git://github.com/RackHD/on-taskgraph.git","ssh_url":"git@github.com:RackHD/on-taskgraph.git","clone_url":"https://github.com/RackHD/on-taskgraph.git","svn_url":"https://github.com/RackHD/on-taskgraph","homepage":null,"size":592,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":3,"forks":44,"open_issues":3,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156"},"html":{"href":"https://github.com/RackHD/on-taskgraph/pull/156"},"issue":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/issues/156"},"comments":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/on-taskgraph/statuses/910baeca217e61841117c472cc42d702255ea468"}}}}
{"actor":{"display_login":"ytjohn"}}