UNPKG

wireguard-tools-extended

Version:

The best way to interact with WireGuard from Node

18 lines (17 loc) 642 B
/// <reference types="node" /> import childProcess from 'child_process'; export declare const execute: typeof childProcess.exec.__promisify__; interface Options { /** Function to run when data is returned from exec */ onData?: (data: string) => any; /** Function to run when error occurs */ onError?: (err: string) => any; /** Function to run when exec ends */ onClose?: (code: number) => any; } /** * A better exec with promises etc. */ export declare const exec: (command: string, opts?: Options | undefined) => Promise<string>; export declare function sudo(command: string, password?: string): string; export {};