# Run elasticsearch on startup - Ubuntu SysV install not working

**URL:** https://discuss.elastic.co/t/run-elasticsearch-on-startup-ubuntu-sysv-install-not-working/45278
**Category:** Elasticsearch
**Created:** [March 23, 2016, 7:19pm UTC](https://discuss.elastic.co/t/run-elasticsearch-on-startup-ubuntu-sysv-install-not-working/45278 "2016-03-23T19:19:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nick\_Bauer](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nick\_Bauer](https://discuss.elastic.co/u/Nick_Bauer)
#### Post date: [March 23, 2016, 7:19pm UTC](https://discuss.elastic.co/t/run-elasticsearch-on-startup-ubuntu-sysv-install-not-working/45278/1 "2016-03-23T19:19:20Z")

</div>

I am installing elasticsearch 2.2.1 on Ubuntu 14.04. Following this guide [https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html)

Ubuntu 14.04 has SysV (/etc/init.d)  
when running $ sudo update-rc.d elasticsearch defaults 95 10  
I get: update-rc.d: /etc/init.d/elasticsearch: file does not exist

I suppose I could write my own script, but that will take time, and i suppose that the one that is supposed to be there would be better / more robust.

I have tried uninstalling and reinstalling the package already.

---

<div class="post-metadata">

### Author: ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)
#### Post date: [March 23, 2016, 9:45pm UTC](https://discuss.elastic.co/t/run-elasticsearch-on-startup-ubuntu-sysv-install-not-working/45278/2 "2016-03-23T21:45:21Z")

</div>

Hi,

From what I can tell an init script is shipped with the .deb package:

```auto
[root@logstash:~]$ apt-get download elasticsearch                                                                                                                  
Get:1 http://packages.elastic.co/elasticsearch/2.x/debian/ stable/main elasticsearch all 2.2.1 [29.3 MB]
[root@logstash:~]$ dpkg -c elasticsearch_2.2.1_all.deb | grep init.d                                                                                               
drwxr-xr-x root/root 0 2016-03-09 09:45 ./etc/init.d/
-rwxr-xr-x root/root 5428 2016-03-09 09:45 ./etc/init.d/elasticsearch

```

You may want to confirm this yourself.

---

<div class="post-metadata">

### Author: ![Nick\_Bauer](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nick\_Bauer](https://discuss.elastic.co/u/Nick_Bauer)
#### Post date: [March 26, 2016, 5:18pm UTC](https://discuss.elastic.co/t/run-elasticsearch-on-startup-ubuntu-sysv-install-not-working/45278/3 "2016-03-26T17:18:17Z")

</div>

Yup, that was it. A bit annoying that the ubuntu repo is missing this. I do have a "complaint" about ES, there is no respawn / recovery element as far as I can see. Working on solving that right now.

---

<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 5, 2017, 11:04pm UTC](https://discuss.elastic.co/t/run-elasticsearch-on-startup-ubuntu-sysv-install-not-working/45278/4 "2017-07-05T23:04:55Z")

</div>


