{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/4470","repository_url":"https://api.github.com/repos/elastic/logstash","labels_url":"https://api.github.com/repos/elastic/logstash/issues/4470/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/4470/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/4470/events","html_url":"https://github.com/elastic/logstash/issues/4470","id":126379188,"number":4470,"title":"logstash init script configtest (and restart) broken for configfile","user":{"login":"stdweird","id":1517606,"avatar_url":"https://avatars.githubusercontent.com/u/1517606?v=3","gravatar_id":"","url":"https://api.github.com/users/stdweird","html_url":"https://github.com/stdweird","followers_url":"https://api.github.com/users/stdweird/followers","following_url":"https://api.github.com/users/stdweird/following{/other_user}","gists_url":"https://api.github.com/users/stdweird/gists{/gist_id}","starred_url":"https://api.github.com/users/stdweird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stdweird/subscriptions","organizations_url":"https://api.github.com/users/stdweird/orgs","repos_url":"https://api.github.com/users/stdweird/repos","events_url":"https://api.github.com/users/stdweird/events{/privacy}","received_events_url":"https://api.github.com/users/stdweird/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/logstash/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/elastic/logstash/labels/needs%20details","name":"needs details","color":"cc317c"},{"url":"https://api.github.com/repos/elastic/logstash/labels/packaging","name":"packaging","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-13T09:43:08Z","updated_at":"2016-03-11T17:12:56Z","closed_at":"2016-03-11T17:12:56Z","body":"logstash supports a file for `-f` option, but setting `LS_CONF_DIR` to a file is not support in the init script\r\n\r\nthis is the problematic code\r\n```bash\r\nconfigtest() {\r\n  # Check if a config file exists                                                                                                                     \r\n  if [ ! \"$(ls -A ${LS_CONF_DIR}/* 2> /dev/null)\" ]; then\r\n    log_failure_msg \"There aren't any configuration files in ${LS_CONF_DIR}\"\r\n    exit 1\r\n  fi\r\n```\r\n\r\n* should test for is a file file or presence of files\r\n* `log_failure_msg` does not exist on EL6\r\n\r\nimpact: configtest is broken, but also `restart`, meaning that upgrading to 2.1.1 results in old verison still runnning"}}