Skip to content

Commit

Permalink
Merge branch 'feature/dashboard' of github.com:jeffsu/upbeat into fea…
Browse files Browse the repository at this point in the history
…ture/dashboard
  • Loading branch information
jeffsu committed Sep 11, 2012
2 parents c883036 + 62609bd commit bfac4c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion lib/strategies/pidfile.ms
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
var exec = require('child_process').exec;
var fs = require('fs');

module.exports = #(options) {
// open file, check to see if pid exists
var pidfile = options.pidfile;
var exec = require('child_process').exec;
var fs = require('fs');

return #(cb) {
fs.readFile(pidfile, #(err, pid) {
if (err) return cb('error opening file');

var command = 'ps -p ' + pid.toString().trim() + ' -o comm=';
exec(command, process.env, #(err, stdout, stderr) {
if (err) return cb(err);

var pass = stdout.toString().match(/\n/);
if (!pass) cb('process not running');
else cb();
});
});
}
};
Binary file added www/public/images/shortcut.psd
Binary file not shown.

0 comments on commit bfac4c0

Please sign in to comment.