UNPKG

@joergmittaglawo/dmvconfig

Version:

DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.

46 lines 1.31 kB
"use strict"; /** * Runs the Towel cleanup * @packageDocumentation * * @version 0.0.0-alpha.0 * @date 2020-10-13 * @author Mittag, Jörg (Lawo) <joerg.mittag@lawo.com> * @license SPDX-License-Identifier: MIT */ Object.defineProperty(exports, "__esModule", { value: true }); exports.runTowelCleanupAll = void 0; const vapi_1 = require("vapi"); const vscript_1 = require("vscript"); /** * Runs the Towel cleanup for one node * * @param node The Node Configuration for one node * @param scriptIp The IP to connect to */ async function runTowelCleanup1(scriptIp) { /** * Endpoint for the current blade */ const blade = await vapi_1.VMatrix.open({ ip: scriptIp, towel: 'DMV Configuration' }); try { console.log(`Removing towel from Node ${scriptIp}`); await blade.system.usrinfo.towel.write(''); } catch (error) { console.error(error); } finally { await blade.close(); await vscript_1.pause(2); } } /** * Runs the Towel cleanup * * @param config The DMV Configuration */ const runTowelCleanupAll = (config) => Promise.all(config.nodes.map((node) => runTowelCleanup1(node.scriptIp))); exports.runTowelCleanupAll = runTowelCleanupAll; exports.default = exports.runTowelCleanupAll; //# sourceMappingURL=towels.js.map