@mh-cbon/has-systemd
v1.0.1
Published
tells if a system runs systemd service manager
Downloads
3
Readme
has-systemd
Tells if linux systemd is available.
Usage
require('@mh-cbon/has-systemd')(function (err, systemCtlPath) {
console.log("This system runs systemd : %s", err?"no":"yes");
systemCtlPath && console.log("Found systemdctl at path : %s", systemCtlPath)
})
Testing
systemd friendly
To run the systemd friendly tests on a fedora-like box,
- download and install vagrant
- execute
npm run test-fedora
systemd non friendly
To run the systemd non friendly tests on a fedora-like box,
- download and install
vagrant
- execute
npm run test-not-fedora
or just
- download and install
mocha
mocha test/not-fedora.js
Notes
More tests are needed on more boxes, have a look at this,
- http://unix.stackexchange.com/questions/18209/detect-init-system-using-the-shell
- http://unix.stackexchange.com/questions/196166/how-to-find-out-if-a-system-uses-sysv-upstart-or-systemd-initsystem