1.2.0 • Published 4 years ago

systemd-status v1.2.0

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

systemd-status

Get your current systemd service status

Installation

npm install systemd-status

Note: as systemd only available on Linux, it can only be installed on Linux machines.
If still wish to install it (for development reasons) use --force

Usage

You can use the systemdStatus function to get the status of either a single or multiple services.

Getting a single service status

const systemdStatus = require('systemd-status');

const plexStatus = systemdStatus('plexmediaserver');
// {
//   name: 'plexmediaserver',
//   isActive: true,
//   state: 'running',
//   timestamp: '2020-06-02T13:21:51.716Z',
//   isDisabled: false
// }

Getting multiple services status

const systemdStatus = require('systemd-status');

const currentStatus = systemdStatus(['plexmediaserver', 'smbd', 'pihole-FTL']);
// [
//   {
//     name: 'plexmediaserver',
//     isActive: true,
//     state: 'running',
//     timestamp: '2020-06-02T13:21:51.716Z',
//     isDisabled: false
//   },
//   {
//     name: 'smbd',
//     isActive: false,
//     state: 'dead',
//     timestamp: null,
//     isDisabled: true
//   }
//   {
//     name: 'pihole-FTL',
//     isActive: true,
//     state: 'exited',
//     timestamp: '2020-06-02T13:21:51.716Z',
//     isDisabled: false
//   }
// ]
1.2.0

4 years ago

1.1.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago