Service not starting after boot

Posted May 10, 2014 1.8k views
Hello all, I recently hired a VPS Server here to mess around with since I know little of this stuff. Now, I am trying to start a Dart script when the server boots, but it's not working for some reason. I created a service under /etc/init.d using a template I found online: ----------------------------------------------------- #!/bin/bash # /etc/init.d/dartserver ### BEGIN INIT INFO # Provides: dartserver # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Short script description # Description: Longer script description. ### END INIT INFO case "$1" in start) echo "Starting dartserver" dart /home/jash/development/dartServer/bin/dartserver.dart ;; stop) echo "Stopping dartserver" killall dart killall dartserver ;; *) echo "Usage: /etc/init.d/dartserver start|stop" exit 1 ;; esac exit 0 ----------------------------------------------------- The service works: I can start it with "service dartserver start" Then, when I run "update-rc.d -n dartserver defaults", this is the output: Can anyone see if I am doing something wrong? Thanks!!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer
Hi Peter!

The "-n" basically means you are doing a dryrun. It's showing you what it would do without doing anything. From "man update-rc.d":

-n Don't do anything, just show what we would do.

So just run:

update-rc.d dartserver defaults