1 var kiwi_app
= './kiwi.js';
4 var daemon
= require('daemonize2').setup({
7 pidfile
: '../kiwiirc.pid'
10 switch (process
.argv
[2]) {
24 daemon
.stop(function(err
) {
30 var pid
= daemon
.status();
32 console
.log('Daemon running. PID: ' + pid
);
34 console
.log('Daemon is not running.');
38 console
.log('Loading new config..');
39 daemon
.sendSignal("SIGUSR1");
43 console
.log('Writing stats to log file..');
44 daemon
.sendSignal("SIGUSR2");
48 require('../client/build.js');
52 console
.log('Usage: [-f|start|stop|restart|status|reconfig|build]');