Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    systemd-daemonpublic

    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');
    });

    install

    npm i systemd-daemon

    Downloadslast 7 days

    101

    version

    1.1.1

    license

    ISC

    repository

    github.com

    last publish

    collaborators

    • avatar