1 Reply Latest reply on Apr 30, 2015 11:36 AM by ForumMigrationAdmin

    Initiate NodeJS Server on startup Intel Galileo Gen 1



      Hi wonder if anyone can help, when executing this script manually it works:


      echo "Starting express server"
      /usr/bin/forever start -m 1 -l /home/root/.forever/server.log -o /home/root/.forever/server.log -e err.log --append /home/root/MYFOLDER/server.js

      I have chmod +x /etc/init.d/FILENAME.sh and it executes fine directly. I have also created the rc0,1,2,3,4,5,6 files but on boot the only error I get is the following:

        return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
      Error: ENOENT, no such file or directory '/root/.forever/pids/ZUGs.pid'
          at Object.fs.openSync (fs.js:427:18)
          at Object.fs.writeFileSync (fs.js:966:15)
          at writePid (/usr/lib/node_modules/forever/bin/monitor:13:6)
          at null.<anonymous> (/usr/lib/node_modules/forever/bin/monitor:46:5)
          at EventEmitter.emit (/usr/lib/node_modules/forever/node_modules/forever-monitor/node_modules/broadway/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
          at /usr/lib/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:172:10
          at process._tickCallback (node.js:419:13)

      And the forever script does not startup, does anyone have any ideas or need additional info ?