I am trying to create a / script service to automatically start and manage my nodejs server, but it does not work at all.
First of all, I used this source as the main link http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/
After testing, I minimized the contents of the actual file to avoid any error resulting in (minimum minimum, but it does not work)
description "server" author "blah" start on started mountall stop on shutdown respawn respawn limit 99 5 script export HOME="/var/www" exec nodejs /var/www/server/server.js >> /var/log/node.log 2>&1 end script
The file is saved in /etc/init/server.conf
when trying to run a script (as root user or regular user), I get:
root@iof304 :/etc/init
Then I tried to check my syntax for init-checkconf , the result was:
$ init-checkconf /etc/init/server.conf File /etc/init/server.conf: syntax ok
I tried other things like initctl reload-configuration with no result.
What can I do? How can I make this work? It can't be that hard, right?
init upstart
user169099
source share