UNPKG

systemd-daemon

Version:

Native implementation of the sd-daemon subset of libsystemd. Providing socket activation, sd_notify, sd_booted and watchdog support.

20 lines (17 loc) 356 B
var fs = require('fs'); /* callback is optional */ module.exports = function(callback) { callback = callback || null; if (callback) { fs.access('/run/systemd/system', function(err) { callback(!err); }); } else { try { fs.accessSync('/run/systemd/system'); return true; } catch(e) { return false; } } }