From 710f6f98b34166b7d1ce6214518c4e8939cdfcfd Mon Sep 17 00:00:00 2001 From: Yordadevs Date: Sat, 1 Dec 2018 18:34:16 -0500 Subject: [PATCH] covfefe --- lib/configexample.json | 21 ++++++++++++++++++--- setup | 21 --------------------- 2 files changed, 18 insertions(+), 24 deletions(-) delete mode 100755 setup diff --git a/lib/configexample.json b/lib/configexample.json index 45f6b41..e5089f2 100644 --- a/lib/configexample.json +++ b/lib/configexample.json @@ -4,9 +4,6 @@ "notifyPort": "443 or 80", "notifyPath": "/api/monitor" }, - "debug": { - "enabled": true - }, "security": { "type": "custom", "service": { @@ -17,5 +14,23 @@ "token": "mymetricsjs" } } + }, + "services": { + "enabled": "screen", + "available": { + "screen": { + "run": "screen -S mymetricsjs -dm node ./mymetrics.js", + "stop": "screen -S mymetricsjs -p 0 -X quit", + "install": "sudo apt-get install screen" + }, + "pm2": { + "run": "pm2 start mymetrics.js", + "stop": "pm2 stop mymetrics.js", + "install": "npm install pm2@latest -g" + } + } + }, + "debug": { + "enabled": true } } \ No newline at end of file diff --git a/setup b/setup deleted file mode 100755 index 52d9d1f..0000000 --- a/setup +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -echo "" -echo "myMetricsJs: Setting up everything for you, ser." -echo "" -echo "" -echo "" - -sudo apt update -sudo apt upgrade -y -sudo apt-get install screen - -chmod +x ./client/start -chmod +x ./client/stop -chmod +x ./client/debug -cd client -echo "" -echo "" -echo "" -echo "myMetricsJS: Setup Complete. Please configure your config.json file." -echo ""