Run elasticsearch on startup - Ubuntu SysV install not working

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

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.

Hi,

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

[ 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.

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.