# How to prevent logstash service from auto-startingon centos6

**URL:** <https://discuss.elastic.co/t/how-to-prevent-logstash-service-from-auto-startingon-centos6/54124>\
**Category:** Logstash\
**Created:** [June 28, 2016, 7:49am UTC](https://discuss.elastic.co/t/how-to-prevent-logstash-service-from-auto-startingon-centos6/54124 "2016-06-28T07:49:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharath3185](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@sharath3185](https://discuss.elastic.co/u/sharath3185)\
**Post date:** [June 28, 2016, 7:49am UTC](https://discuss.elastic.co/t/how-to-prevent-logstash-service-from-auto-startingon-centos6/54124/1 "2016-06-28T07:49:43Z")

</div>

I have some custom start/stop scripts to start the logstash and elasticsearch services on my centos system.  
I want elasticsearch service to be started and should be ready to accept the events from logstash before the logstash should start.  
But once the logstash rpm gets installed or when I reboot the machine, logstash service starts first automatically before I start the elasticsearch service from my script.

Is there a config file where I can edit on centos to prevent the logstash service to start automatically?

---

<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:** [June 29, 2016, 7:02am UTC](https://discuss.elastic.co/t/how-to-prevent-logstash-service-from-auto-startingon-centos6/54124/2 "2016-06-29T07:02:50Z")

</div>

Why do you have custom ones?

Doesn't `chkconfig` do what you want?

---

<div class="post-metadata">

**Author:** ![sharath3185](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@sharath3185](https://discuss.elastic.co/u/sharath3185)\
**Post date:** [July 1, 2016, 6:54am UTC](https://discuss.elastic.co/t/how-to-prevent-logstash-service-from-auto-startingon-centos6/54124/3 "2016-07-01T06:54:20Z")

</div>

Thanks. chkconfig did the trick 🙂

---

<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, 4:49am UTC](https://discuss.elastic.co/t/how-to-prevent-logstash-service-from-auto-startingon-centos6/54124/4 "2017-07-06T04:49:56Z")

</div>

Closed on July 6, 2017, 4:49am UTC


