a87a8b49586bbde286f76d3c994f93f5dee0088e
[motion2.git] / server / services / ami / trigger / script / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x46e7=['render','error','format','info','util','mustache','../../../../config/logger','trigger','exec','data2','data3'];(function(_0x2e59e2,_0x926f5e){var _0x1ccff0=function(_0x6882f4){while(--_0x6882f4){_0x2e59e2['push'](_0x2e59e2['shift']());}};_0x1ccff0(++_0x926f5e);}(_0x46e7,0x19b));var _0x746e=function(_0x5f027c,_0x37ff66){_0x5f027c=_0x5f027c-0x0;var _0x202e3d=_0x46e7[_0x5f027c];return _0x202e3d;};'use strict';var util=require(_0x746e('0x0'));var sh=require('shelljs');var Mustache=require(_0x746e('0x1'));var logger=require(_0x746e('0x2'))(_0x746e('0x3'));exports[_0x746e('0x4')]=function(_0x3c03ef,_0x1c11ed){var _0x3a1e17=_0x3c03ef[_0x746e('0x5')]?_0x3c03ef[_0x746e('0x5')]:'Script';var _0x20f9af=_0x3c03ef[_0x746e('0x6')]?Mustache[_0x746e('0x7')](_0x3c03ef[_0x746e('0x6')],_0x1c11ed):_0x1c11ed;sh[_0x746e('0x4')](_0x20f9af,function(_0x4ab86e,_0x7d3825,_0x599cfc){if(_0x4ab86e!==0x0){logger[_0x746e('0x8')](util[_0x746e('0x9')]('%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s',_0x3a1e17,_0x20f9af,_0x4ab86e,_0x599cfc));}else{logger[_0x746e('0xa')](util[_0x746e('0x9')]('%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s',_0x3a1e17,_0x20f9af,_0x7d3825));}});};