Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / config / pm2 / 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 _0x837e=['connect','connected','start','stop','disconnect','restart','then','list','describe','delete','dump','saved','./config'];(function(_0x77e916,_0x3d82c4){var _0x4db828=function(_0x43925b){while(--_0x43925b){_0x77e916['push'](_0x77e916['shift']());}};_0x4db828(++_0x3d82c4);}(_0x837e,0xcf));var _0xe837=function(_0x2a750d,_0x2a98af){_0x2a750d=_0x2a750d-0x0;var _0x12524a=_0x837e[_0x2a750d];return _0x12524a;};'use strict';var pm2=require('pm2');var BPromise=require('bluebird');var config=require(_0xe837('0x0'));function connect(){return new BPromise(function(_0x55e62c,_0x572542){return pm2[_0xe837('0x1')](function(_0x3bca64){if(_0x3bca64){return _0x572542(_0x3bca64);}return _0x55e62c(_0xe837('0x2'));});});};exports[_0xe837('0x3')]=function(_0x43d370){return connect()['then'](function(){return new BPromise(function(_0xd968d4,_0x4f1e2d){return pm2[_0xe837('0x3')](_0x43d370,function(_0x307f04,_0x1dd57f){if(_0x307f04){return _0x4f1e2d(_0x307f04);}pm2['disconnect']();return _0xd968d4(_0x1dd57f);});});});};exports[_0xe837('0x4')]=function(_0xf058e5){return connect()['then'](function(){return new BPromise(function(_0x3aa06e,_0x48316b){return pm2['stop'](_0xf058e5,function(_0x27ee54,_0x49fd2a){if(_0x27ee54){return _0x48316b(_0x27ee54);}pm2[_0xe837('0x5')]();return _0x3aa06e(_0x49fd2a);});});});};exports[_0xe837('0x6')]=function(_0x5e0f83){return connect()[_0xe837('0x7')](function(){return new BPromise(function(_0x414149,_0x2e937d){return pm2['restart'](_0x5e0f83,function(_0x4b5fc6,_0x300097){if(_0x4b5fc6){return _0x2e937d(_0x4b5fc6);}pm2[_0xe837('0x5')]();return _0x414149(_0x300097);});});});};exports[_0xe837('0x8')]=function(){return connect()['then'](function(){return new BPromise(function(_0x174e7f,_0x4e5daa){return pm2[_0xe837('0x8')](function(_0x25c36d,_0x31fc1b){if(_0x25c36d){return _0x4e5daa(_0x25c36d);}pm2[_0xe837('0x5')]();return _0x174e7f(_0x31fc1b);});});});};exports[_0xe837('0x9')]=function(_0xd20688){return connect()[_0xe837('0x7')](function(){return new BPromise(function(_0x7f089e,_0x4227bd){return pm2[_0xe837('0x9')](_0xd20688,function(_0x55f7c1,_0x25025b){if(_0x55f7c1){return _0x4227bd(_0x55f7c1);}pm2['disconnect']();return _0x7f089e(_0x25025b);});});});};exports[_0xe837('0xa')]=function(_0x127304){return connect()[_0xe837('0x7')](function(){return new BPromise(function(_0x3c8761,_0x54deed){return pm2[_0xe837('0xa')](_0x127304,function(_0x44213a,_0x22918b){if(_0x44213a){return _0x54deed(_0x44213a);}pm2[_0xe837('0x5')]();return _0x3c8761(_0x22918b);});});});};exports[_0xe837('0xb')]=function(){return connect()[_0xe837('0x7')](function(){return new BPromise(function(_0x5b025b,_0x2681fb){return pm2['dump'](function(_0x3f8f5c){if(_0x3f8f5c){return _0x2681fb(_0x3f8f5c);}return _0x5b025b(_0xe837('0xc'));});});});};