Built motion from commit 97153652.|2.6.26
[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 _0x74c7=['format','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache','../../../../config/logger','trigger','exec','data2','data3','render','error'];(function(_0xac151d,_0x4ea1d2){var _0x111dba=function(_0x13d7f4){while(--_0x13d7f4){_0xac151d['push'](_0xac151d['shift']());}};_0x111dba(++_0x4ea1d2);}(_0x74c7,0x16f));var _0x774c=function(_0x4b10cf,_0x46cb9e){_0x4b10cf=_0x4b10cf-0x0;var _0x38c3a2=_0x74c7[_0x4b10cf];return _0x38c3a2;};'use strict';var util=require(_0x774c('0x0'));var sh=require(_0x774c('0x1'));var Mustache=require(_0x774c('0x2'));var logger=require(_0x774c('0x3'))(_0x774c('0x4'));exports[_0x774c('0x5')]=function(_0x4a4aac,_0x3a41ac){var _0x370d1a=_0x4a4aac[_0x774c('0x6')]?_0x4a4aac[_0x774c('0x6')]:'Script';var _0x10cb4f=_0x4a4aac[_0x774c('0x7')]?Mustache[_0x774c('0x8')](_0x4a4aac[_0x774c('0x7')],_0x3a41ac):_0x3a41ac;sh[_0x774c('0x5')](_0x10cb4f,function(_0x45af1c,_0x1c8cbb,_0x1ba991){if(_0x45af1c!==0x0){logger[_0x774c('0x9')](util[_0x774c('0xa')](_0x774c('0xb'),_0x370d1a,_0x10cb4f,_0x45af1c,_0x1ba991));}else{logger['info'](util[_0x774c('0xa')](_0x774c('0xc'),_0x370d1a,_0x10cb4f,_0x1c8cbb));}});};