# systemctl

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

Latest version **0.2.2** (published 2018-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install systemctl
pnpm add systemctl
yarn add systemctl
bun add systemctl
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2018-04-19 |
| First published | 2017-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ben McClure |
| Maintainers | bmcclure |
| Keywords | Systemctl, Systemd, Arch, Archlinux |

## Links

- npm: https://www.npmjs.com/package/systemctl
- Repository: https://github.com/bmcclure/node-systemctl
- Issues: https://github.com/bmcclure/node-systemctl/issues
- npm.io page: https://npm.io/package/systemctl

## Dependencies (2)

- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [child-process-promise](https://npm.io/package/child-process-promise.md) ^2.2.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.2.2 (latest) — 2018-04-19
- 0.2.1 — 2018-04-19
- 0.1.4 — 2017-06-26
- 0.1.3 — 2017-06-26
- 0.1.2 — 2017-06-25
- 0.1.1 — 2017-06-21
- 0.1.0 — 2017-06-21

## README

# 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)
```

---
_Source: https://npm.io/package/systemctl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
