# centos7-netconfig

> config network interfaces on centos 7

Latest version **1.0.1** (published 2018-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install centos7-netconfig
pnpm add centos7-netconfig
yarn add centos7-netconfig
bun add centos7-netconfig
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-08-10 |
| First published | 2018-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fellipe Paiva |
| Maintainers | fellipepaiva |
| Keywords | centos, centos7, network, network interfaces |

## Links

- npm: https://www.npmjs.com/package/centos7-netconfig
- npm.io page: https://npm.io/package/centos7-netconfig

## Recent versions

- 1.0.1 (latest) — 2018-08-10
- 1.0.0 — 2018-08-09

## README

# Centos7 netconfig

## Example:
```js

let {
  isIP,
  listEths,
  updateEth
} = require('centos7-netconfig')

listEths()
.map(eth => readEth(eth))
/*
List like
[
  {
    "eth": "eth0",
    "isDhcp": false,
    "address": "186.232.183.4",
    "netmask": "26",
    "gateway": "186.232.183.1",
    "dns": "8.8.8.8"
  }
]
*/

listEths()
/*
[ 'eth0', ... ]
without local
*/
.map(eth => updateEth(eth, {
  address:   '10.2.20.12',
  netmask:   '255.255.255.0', /* or */ netmask: 24,
  gateway:   '10.2.20.254',
  dns:       '1.1.1.1',
  isDhcp:    false,
  isRestart: true /* default is false to restart interface */
}))

/* bonus 😉 */
isIP('10.2.20.12')

```

## License

  [MIT](LICENSE)

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