{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/comments/88627191","pull_request_review_id":9195225,"id":88627191,"diff_hunk":"@@ -11,30 +11,32 @@ esac\n \n case ${ROLE} in\n worker)\n-    echo \"creating rails_runner.sh for running rails runners via a cron job\"\n-    env > env.sh\n-    sed -i '/ADMIN_IP_RANGES.*/d' env.sh\n-    sed -i '/NEW_RELIC_APP_NAME.*/d' env.sh\n-    cat env.sh | xargs > rails_runner.sh\n-    PATH_APPENDS='PATH=/usr/local/bundle/bin:$PATH GEM_HOME=/usr/local/bundle GEM_PATH=/usr/local/bundle:$GEM_PATH'\n+    echo 'exporting non-language env vars to cron available environment'\n+    env | grep -ve LANG -ve LC_ >> '/etc/environment'\n+\n+    echo 'exporting language vars to default locale'\n+    env | grep -e LANG -e LC_ >> '/etc/default/locale'\n+\n+    echo 'writing rails runner script'\n     echo '#!/bin/bash' > rails_runner.sh\n-    echo \"cd /usr/src/app\" >> rails_runner.sh\n-    echo \"cd /usr/src/app && $(cat env.sh | xargs) $PATH_APPENDS bin/rails runner -e production \\$1\" >> rails_runner.sh\n+    PATH_APPENDS='PATH=/usr/local/bundle/bin:$PATH GEM_HOME=/usr/local/bundle GEM_PATH=/usr/local/bundle:$GEM_PATH'\n+    echo \"cd /usr/src/app && $PATH_APPENDS bin/rails runner -e production \\$1\" >> rails_runner.sh\n     chmod a+x rails_runner.sh\n \n-    echo \"installing and running cron\"\n-    apt-get update\n-    apt-get install -y cron\n-    cron\n+    echo \"installing cron\"\n+    apt-get update && apt-get install -y cron\n+\n+    echo \"starting cron\"\n+    service cron start","path":"run.sh","position":32,"original_position":32,"commit_id":"1dc135eec414ea7e2a0703e41b021b7c5b11cee0","original_commit_id":"1dc135eec414ea7e2a0703e41b021b7c5b11cee0","user":{"login":"jsugarman","id":7016425,"avatar_url":"https://avatars.githubusercontent.com/u/7016425?v=3","gravatar_id":"","url":"https://api.github.com/users/jsugarman","html_url":"https://github.com/jsugarman","followers_url":"https://api.github.com/users/jsugarman/followers","following_url":"https://api.github.com/users/jsugarman/following{/other_user}","gists_url":"https://api.github.com/users/jsugarman/gists{/gist_id}","starred_url":"https://api.github.com/users/jsugarman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsugarman/subscriptions","organizations_url":"https://api.github.com/users/jsugarman/orgs","repos_url":"https://api.github.com/users/jsugarman/repos","events_url":"https://api.github.com/users/jsugarman/events{/privacy}","received_events_url":"https://api.github.com/users/jsugarman/received_events","type":"User","site_admin":false},"body":"yeah i was thinking to do that. have you tested it. I assume restart will start if currently stopped?!","created_at":"2016-11-18T09:52:13Z","updated_at":"2016-11-18T09:52:13Z","html_url":"https://github.com/ministryofjustice/peoplefinder/pull/399#discussion_r88627191","pull_request_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/comments/88627191"},"html":{"href":"https://github.com/ministryofjustice/peoplefinder/pull/399#discussion_r88627191"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399","id":94212238,"html_url":"https://github.com/ministryofjustice/peoplefinder/pull/399","diff_url":"https://github.com/ministryofjustice/peoplefinder/pull/399.diff","patch_url":"https://github.com/ministryofjustice/peoplefinder/pull/399.patch","issue_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/399","number":399,"state":"open","locked":false,"title":"Refactor rails runner script","user":{"login":"jsugarman","id":7016425,"avatar_url":"https://avatars.githubusercontent.com/u/7016425?v=3","gravatar_id":"","url":"https://api.github.com/users/jsugarman","html_url":"https://github.com/jsugarman","followers_url":"https://api.github.com/users/jsugarman/followers","following_url":"https://api.github.com/users/jsugarman/following{/other_user}","gists_url":"https://api.github.com/users/jsugarman/gists{/gist_id}","starred_url":"https://api.github.com/users/jsugarman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsugarman/subscriptions","organizations_url":"https://api.github.com/users/jsugarman/orgs","repos_url":"https://api.github.com/users/jsugarman/repos","events_url":"https://api.github.com/users/jsugarman/events{/privacy}","received_events_url":"https://api.github.com/users/jsugarman/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-17T17:23:44Z","updated_at":"2016-11-18T09:52:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2241a2071ec83e9b17256c4026a65b5508f263d6","assignee":{"login":"colinbruce","id":6757677,"avatar_url":"https://avatars.githubusercontent.com/u/6757677?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbruce","html_url":"https://github.com/colinbruce","followers_url":"https://api.github.com/users/colinbruce/followers","following_url":"https://api.github.com/users/colinbruce/following{/other_user}","gists_url":"https://api.github.com/users/colinbruce/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbruce/subscriptions","organizations_url":"https://api.github.com/users/colinbruce/orgs","repos_url":"https://api.github.com/users/colinbruce/repos","events_url":"https://api.github.com/users/colinbruce/events{/privacy}","received_events_url":"https://api.github.com/users/colinbruce/received_events","type":"User","site_admin":false},"assignees":[{"login":"colinbruce","id":6757677,"avatar_url":"https://avatars.githubusercontent.com/u/6757677?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbruce","html_url":"https://github.com/colinbruce","followers_url":"https://api.github.com/users/colinbruce/followers","following_url":"https://api.github.com/users/colinbruce/following{/other_user}","gists_url":"https://api.github.com/users/colinbruce/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbruce/subscriptions","organizations_url":"https://api.github.com/users/colinbruce/orgs","repos_url":"https://api.github.com/users/colinbruce/repos","events_url":"https://api.github.com/users/colinbruce/events{/privacy}","received_events_url":"https://api.github.com/users/colinbruce/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/399/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/statuses/1dc135eec414ea7e2a0703e41b021b7c5b11cee0","head":{"label":"ministryofjustice:refactor-rails-runner-script","ref":"refactor-rails-runner-script","sha":"1dc135eec414ea7e2a0703e41b021b7c5b11cee0","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":20886151,"name":"peoplefinder","full_name":"ministryofjustice/peoplefinder","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/peoplefinder","description":null,"fork":false,"url":"https://api.github.com/repos/ministryofjustice/peoplefinder","forks_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/forks","keys_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/events","assignees_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/merges","archive_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/deployments","created_at":"2014-06-16T13:39:22Z","updated_at":"2016-10-22T09:54:16Z","pushed_at":"2016-11-18T09:43:20Z","git_url":"git://github.com/ministryofjustice/peoplefinder.git","ssh_url":"git@github.com:ministryofjustice/peoplefinder.git","clone_url":"https://github.com/ministryofjustice/peoplefinder.git","svn_url":"https://github.com/ministryofjustice/peoplefinder","homepage":"https://peoplefinder.service.gov.uk/","size":5889,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":4,"forks":9,"open_issues":4,"watchers":11,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"40c7a7aa7a4bedb7369d55ca680399eb574c3d76","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":20886151,"name":"peoplefinder","full_name":"ministryofjustice/peoplefinder","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/peoplefinder","description":null,"fork":false,"url":"https://api.github.com/repos/ministryofjustice/peoplefinder","forks_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/forks","keys_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/events","assignees_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/merges","archive_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/peoplefinder/deployments","created_at":"2014-06-16T13:39:22Z","updated_at":"2016-10-22T09:54:16Z","pushed_at":"2016-11-18T09:43:20Z","git_url":"git://github.com/ministryofjustice/peoplefinder.git","ssh_url":"git@github.com:ministryofjustice/peoplefinder.git","clone_url":"https://github.com/ministryofjustice/peoplefinder.git","svn_url":"https://github.com/ministryofjustice/peoplefinder","homepage":"https://peoplefinder.service.gov.uk/","size":5889,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":4,"forks":9,"open_issues":4,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399"},"html":{"href":"https://github.com/ministryofjustice/peoplefinder/pull/399"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/399"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/issues/399/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/pulls/399/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/peoplefinder/statuses/1dc135eec414ea7e2a0703e41b021b7c5b11cee0"}}}}
{"actor":{"display_login":"jsugarman"}}