systemd-daemon

1.1.2 • Public • Published

node-systemd-daemon

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

Usage

var sd = require('systemd-daemon');
/* Enable watchdog reporting if required by the unit file.
   Use sd.watchdog.stop() once you shutdown your app. */
sd.watchdog.start();
 
/* Listen on systemd socket if available, else port 3000 */
app.listen(sd.socket() || 3000, function() {
  /* Notify systemd we've finished startup.
     To be used together with Type=notify in app.service */
  sd.notify('READY=1');
});

Package Sidebar

Install

npm i systemd-daemon

Weekly Downloads

118

Version

1.1.2

License

ISC

Unpacked Size

4.5 kB

Total Files

8

Last publish

Collaborators

  • bnf