New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

systemd-status

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemd-status

Get your current systemd services status

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

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
//   }
// ]

Keywords

systemd

FAQs

Package last updated on 30 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts