This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require("sys"); | |
var daemon = require("./daemon"); | |
// Do whatever initialization stuff you need here | |
daemon.start(); | |
// Your daemon code goes here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require("sys"); | |
var daemon = require("./daemon"); | |
// Do whatever initialization stuff you need here | |
var pid = daemon.start(); //Returns daemons PID | |
daemon.closeIO(); // Closes stdin, stdout, stderr | |
process.umask(027); //Change umask | |
process.chdir("/var/myserver"); //Change working directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var daemon = require('./daemon'); | |
var sys = require('sys'); | |
var fs = require('fs'); | |
var http = require('http'); | |
var config = { | |
lockFile: '/tmp/hellohttpd.lock' //Location of lockFile | |
}; | |
var args = process.argv; |