{"action":"opened","issue":{"url":"https://api.github.com/repos/flynn/flynn/issues/1371","labels_url":"https://api.github.com/repos/flynn/flynn/issues/1371/labels{/name}","comments_url":"https://api.github.com/repos/flynn/flynn/issues/1371/comments","events_url":"https://api.github.com/repos/flynn/flynn/issues/1371/events","html_url":"https://github.com/flynn/flynn/issues/1371","id":64893269,"number":1371,"title":"Install script should remove files before writing","user":{"login":"titanous","id":13026,"avatar_url":"https://avatars.githubusercontent.com/u/13026?v=3","gravatar_id":"","url":"https://api.github.com/users/titanous","html_url":"https://github.com/titanous","followers_url":"https://api.github.com/users/titanous/followers","following_url":"https://api.github.com/users/titanous/following{/other_user}","gists_url":"https://api.github.com/users/titanous/gists{/gist_id}","starred_url":"https://api.github.com/users/titanous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titanous/subscriptions","organizations_url":"https://api.github.com/users/titanous/orgs","repos_url":"https://api.github.com/users/titanous/repos","events_url":"https://api.github.com/users/titanous/events{/privacy}","received_events_url":"https://api.github.com/users/titanous/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flynn/flynn/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/flynn/flynn/labels/easy","name":"easy","color":"009800"},{"url":"https://api.github.com/repos/flynn/flynn/labels/install-script","name":"install-script","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-28T03:31:44Z","updated_at":"2015-03-28T03:31:44Z","closed_at":null,"body":"The install script should remove destination files before writing new ones, otherwise if flynn is running it will fail with errors like:\r\n\r\n```text\r\n03:20:39.065205 host.go:131: open /usr/local/bin/flynn-init: text file busy\r\n===> 03:20:39.069 ERROR: failed to run \"/usr/local/bin/flynn-host download --repository https://dl.flynn.io/tuf - -tuf-db /etc/flynn/tuf.db --config-dir /etc/flynn --bin-dir /usr/local/bin\", exit status 1\r\n```\r\n\r\nThis is just a hypothesis, we should test it before committing."}}