systemd-notify
Notify systemd
about start-up completion and other daemon status changes.
Installation
npm install systemd-notify
Usage
systemd-notify
supports both callbacks and promises.
notify(opts = {}, [callback]);
const notify = require('systemd-notify');
const opts = {
ready: true,
status: 'Ready to go',
pid: 1337
};
notify(opts, (err) => {
});
notify(opts).then(() => {
}).catch((err) => {
});
async function() {
try {
await notify(opts);
}
catch (e) {
}
}
For more information about the options, consult with the man-page:
https://www.freedesktop.org/software/systemd/man/systemd-notify.html
License
MIT