1

I installed influxdb on ubuntu 16 and for some reason when I try to write in the terminal service influxd it gives me influxd: unrecognized service.

if I type only influxd than the influxdb server is starting up, so the command influxd is up

 $ which influxd :
 $ /usr/bin/influxd

What I try to do is to make it act like service so I can start and stop it on demand, and make it autostart on boot

tried making a symbolic link to folder /etc/init.d not working either.

1 Answer 1

1

You can solve this by adding your call into /etc/rc.local so that files contents would look like this afterwards:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

Examples (use only one, you might need to try which one will work):

# option 1. direct call
/usr/bin/influxd
# option 2. call it from init.d but I'm not sure this will work in your case
/etc/init.d/influxd start

exit 0

With Ubuntu 16.04 LTS you could, as pointed out in the comments, as well have a look at systemd services. I wouldn't be able to explain it better as in the linked doc-sheet so i leave it as link only.

2
  • 1
    with ubuntu 16.04 i would have a look at systemd services, however
    – mnagel
    Jun 2, 2016 at 18:34
  • @mnagel Good point, will add that to the answer, I usually post answers based on the solution which comes to my mind first :)
    – Videonauth
    Jun 2, 2016 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .