1.0.1 • Published 8 years ago
@mh-cbon/has-systemd v1.0.1
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,
1.0.1
8 years ago