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.
#!/bin/bash
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
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: http://188.226.238.112/consoleOutput.jpg
Can anyone see if I am doing something wrong? Thanks!!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi Peter! <br> <br>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”: <br> <br><pre> <br> -n Don’t do anything, just show what we would do. <br></pre> <br> <br>So just run: <br> <br><pre> <br>update-rc.d dartserver defaults <br></pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.