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

systemctl

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemctl

Allows you to control system services using the systemctl command easily and asynchronously

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

systemctl

This simple node module allows you to control system services using the systemctl command easily and asynchronously.

Requirements

  • Archlinux or another OS which uses the systemctl command

Usage

There are two ways to use systemctl depending on your needs:

1. Utilize the helper functions

// For ES6:
import systemctl from 'systemctl'
// For ES5:
var systemctl = require('systemctl')

// Start a service
systemctl.start('service-name').then(output => console.log)

// Check if a service is enabled
systemctl.isEnabled('service-name').then(enabled => {
    console.log((enabled ? 'Enabled' : 'Not enabled'));
})

2. Utilize the systemctl/run module for lower-level access

// For ES6:
import systemctl from 'systemctl/run'
// For ES5:
var systemctl = require('systemctl/run')

// Start a service
systemctl('start', 'service-name').then(output => console.log)

Keywords

Systemctl

FAQs

Package last updated on 19 Apr 2018

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