# Init scripts defaults

**URL:** <https://discuss.elastic.co/t/init-scripts-defaults/27528>\
**Category:** Logstash\
**Created:** [August 17, 2015, 5:10pm UTC](https://discuss.elastic.co/t/init-scripts-defaults/27528 "2015-08-17T17:10:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erwin](https://avatars.discourse-cdn.com/v4/letter/e/a88e57/32.png) [@Erwin](https://discuss.elastic.co/u/Erwin)\
**Post date:** [August 17, 2015, 5:10pm UTC](https://discuss.elastic.co/t/init-scripts-defaults/27528/1 "2015-08-17T17:10:11Z")

</div>

I just installed Elastic and Logstash on Debian via the repositories given via the site [https://www.elastic.co/guide/en/logstash/current/package-repositories.html](https://www.elastic.co/guide/en/logstash/current/package-repositories.html)  
Now i noticed that the the scripts:

- /etc/init.d/logstash
- /etc/default/logstash  
Are not fully in line with eachother regarding its own logfile. Now i dont know how where to file a bug report so i post it here.

Specified:

- /etc/default/logstash  
(line 25/26)  
# logstash logging  
#LS\_LOG\_FILE=/var/log/logstash/logstash.log (here whole path is specified)  
#LS\_USE\_GC\_LOGGING="true"

- /etc/init.d/logstash  
(line 33/34)  
LS\_LOG\_DIR=/var/log/logstash  
LS\_LOG\_FILE="${LS\_LOG\_DIR}/$name.log"

And the init file sources the default file afterwards, so far OK but further in the init script (line 70) the VAR $LS\_LOG\_DIR is used so that is not consistent and creates a situation which is not expected.  
exec "$program" $args  
" \> "${LS\_LOG\_DIR}/$name.stdout" 2\> "${LS\_LOG\_DIR}/$name.err" &

Also doesnt this construct the method to use only one logfile for logstash, defined in the default file.  
I like to use only one file in and specify it in /etc/default/logstash e.g. with the name /var/log/logstash\_logfile

Also if you check the logrotate config supplied, here the default path is /var/log/logstash/\*.log

Sure it is easy to solve but it is messy, i rather see it cleaned up at the source.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 17, 2015, 10:23pm UTC](https://discuss.elastic.co/t/init-scripts-defaults/27528/2 "2015-08-17T22:23:11Z")

</div>

You can raise bugs here - [https://github.com/elastic/logstash/issues/](https://github.com/elastic/logstash/issues/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:31am UTC](https://discuss.elastic.co/t/init-scripts-defaults/27528/3 "2017-07-06T05:31:42Z")

</div>


