{"action":"created","issue":{"url":"https://api.github.com/repos/adnanh/webhook/issues/60","labels_url":"https://api.github.com/repos/adnanh/webhook/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/adnanh/webhook/issues/60/comments","events_url":"https://api.github.com/repos/adnanh/webhook/issues/60/events","html_url":"https://github.com/adnanh/webhook/issues/60","id":120671010,"number":60,"title":"fork/exec: exec format error (question)","user":{"login":"joseluisq","id":1700322,"avatar_url":"https://avatars.githubusercontent.com/u/1700322?v=3","gravatar_id":"","url":"https://api.github.com/users/joseluisq","html_url":"https://github.com/joseluisq","followers_url":"https://api.github.com/users/joseluisq/followers","following_url":"https://api.github.com/users/joseluisq/following{/other_user}","gists_url":"https://api.github.com/users/joseluisq/gists{/gist_id}","starred_url":"https://api.github.com/users/joseluisq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseluisq/subscriptions","organizations_url":"https://api.github.com/users/joseluisq/orgs","repos_url":"https://api.github.com/users/joseluisq/repos","events_url":"https://api.github.com/users/joseluisq/events{/privacy}","received_events_url":"https://api.github.com/users/joseluisq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-06T23:28:25Z","updated_at":"2015-12-07T16:15:01Z","closed_at":null,"body":"Hi,\r\nI have following settings:\r\n```json\r\n[\r\n  {\r\n    \"id\": \"redeploy-webhook\",\r\n    \"execute-command\": \"/home/joseluis/test/hooks/redeploy.sh\",\r\n    \"command-working-directory\": \"/home/joseluis/test\",\r\n    \"response-message\": \"I got the payload!\"\r\n  }\r\n]\r\n```\r\n\r\nI request the hook:\r\n```sh\r\n$ curl http://localhost:9000/hooks/redeploy-webhook\r\nI got the payload!\r\n```\r\n\r\nOn the terminal I got this error:\r\n\r\n```sh\r\n$ webhook -hooks hooks.json -verbose \r\n[webhook] 2015/12/06 16:58:02 version 2.3.6 starting\r\n[webhook] 2015/12/06 16:58:02 setting up os signal watcher\r\n[webhook] 2015/12/06 16:58:02 attempting to load hooks from hooks.json\r\n[webhook] 2015/12/06 16:58:02 loaded 1 hook(s) from file\r\n[webhook] 2015/12/06 16:58:02 \t> redeploy-webhook\r\n[webhook] 2015/12/06 16:58:02 os signal watcher ready\r\n[webhook] 2015/12/06 16:58:02 starting insecure (http) webhook on :9000\r\n[webhook] 2015/12/06 16:58:07 Started GET /hooks/redeploy-webhook\r\n[webhook] 2015/12/06 16:58:07 redeploy-webhook got matched (1 time(s))\r\n[webhook] 2015/12/06 16:58:07 redeploy-webhook hook triggered successfully\r\n[webhook] 2015/12/06 16:58:07 Completed 200 OK in 265.558µs\r\n[webhook] 2015/12/06 16:58:07 executing /home/joseluis/test/hooks/redeploy.sh \r\n(/home/joseluis/test/hooks/redeploy.sh) with arguments \r\n[\"/home/joseluis/test/hooks/redeploy.sh\"] and environment [] \r\nusing /home/joseluis/test as cwd\r\n[webhook] 2015/12/06 16:58:07 command output: \r\n[webhook] 2015/12/06 16:58:07 error occurred: \r\nfork/exec /home/joseluis/test/hooks/redeploy.sh: exec format error\r\n[webhook] 2015/12/06 16:58:07 finished handling redeploy-webhook\r\n```\r\n\r\nMy simple `echo \"Hello\"` command in `redeploy.sh` doesn't execute.\r\nWhat am I doing wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/adnanh/webhook/issues/comments/162572937","html_url":"https://github.com/adnanh/webhook/issues/60#issuecomment-162572937","issue_url":"https://api.github.com/repos/adnanh/webhook/issues/60","id":162572937,"user":{"login":"joseluisq","id":1700322,"avatar_url":"https://avatars.githubusercontent.com/u/1700322?v=3","gravatar_id":"","url":"https://api.github.com/users/joseluisq","html_url":"https://github.com/joseluisq","followers_url":"https://api.github.com/users/joseluisq/followers","following_url":"https://api.github.com/users/joseluisq/following{/other_user}","gists_url":"https://api.github.com/users/joseluisq/gists{/gist_id}","starred_url":"https://api.github.com/users/joseluisq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseluisq/subscriptions","organizations_url":"https://api.github.com/users/joseluisq/orgs","repos_url":"https://api.github.com/users/joseluisq/repos","events_url":"https://api.github.com/users/joseluisq/events{/privacy}","received_events_url":"https://api.github.com/users/joseluisq/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T16:15:01Z","updated_at":"2015-12-07T16:15:01Z","body":"Exists some complete example with `.sh` and `hook.json` for testing on my OS? "}}