ifupdown-interfaces
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

ifupdown-interfaces

Installation

YARN

$ yarn add ifupdown-interfaces

NPM

$ npm install --save ifupdown-interfaces

Usage

import IfUpdownInterfaces from 'ifupdown-interfaces';

const instance = new IfUpdownInterfaces();
await instance.open('/etc/network/interfaces');

instance.addSingleLine('auto', ['vmbr5']);
instance.addInterface('vmbr5', ['inet', 'manual'], [
  {
    comment: false,
    key: 'address',
    value: '1.1.1.1/24'
  },
  {
    comment: false,
    key: 'ovs_type',
    value: 'OVSBridge'
  },
  {
    comment: false,
    key: 'ovs_ports',
    value: 'eno1 eno2'
  }
]);

await instance.save();

License

Apache-2.0

Package Sidebar

Install

npm i ifupdown-interfaces

Weekly Downloads

4

Version

0.0.3

License

Apache-2.0

Unpacked Size

30.2 kB

Total Files

7

Last publish

Collaborators

  • jc-lab