Browse Source

install

master
zeus 3 years ago
parent
commit
b64e31fd14
  1. 40
      files/VuetableCssConfig.js
  2. 40
      install.sh
  3. 25
      src-local/ecosystem.config-backup.js
  4. 2
      src-local/logs/logfile
  5. 2
      src-local/logs/outfile
  6. 2
      src-local/pid-0.pid

40
files/VuetableCssConfig.js

@ -0,0 +1,40 @@
export default {
table: {
tableWrapper: '',
tableHeaderClass: 'mb-0',
tableBodyClass: 'mb-0',
tableClass: 'table table-bordered table-hover table-sm table-condensed whitespace',
loadingClass: 'loading',
ascendingIcon: 'fa fa-chevron-up',
descendingIcon: 'fa fa-chevron-down',
ascendingClass: 'sorted-asc',
descendingClass: 'sorted-desc',
sortableIcon: 'fa fa-sort',
detailRowClass: 'vuetable-detail-row',
handleIcon: 'fa fa-bars text-secondary',
renderIcon: function(classes, options) {
return `<i class="${classes.join(" ")}" ${options}></span>`;
}
},
paginationInfo: {
infoClass: 'pull-left float-left align-self-end'
},
pagination: {
wrapperClass: "pagination pull-right float-right",
activeClass: "active",
disabledClass: "disabled",
pageClass: "btn btn-border",
linkClass: "btn btn-border",
paginationClass: "pagination",
paginationInfoClass: "float-left",
//pagination-info-class=""
//pagination-component-class=""
dropdownClass: "form-control",
icons: {
first: "",
prev: "",
next: "",
last: ""
}
}
}

40
install.sh

@ -47,6 +47,15 @@ if [ $wgversion != 'wireguard-tools' ];then
toolsok='no'
fi
#check for pm2
if ! command -v pm2 &> /dev/null
then
toolsok='no'
echo "pm2 could not be found"
echo "sudo npm install -g pm2"
exit
fi
#check for jq
if ! command -v jq &> /dev/null
then
@ -66,6 +75,37 @@ if [ $toolsok == 'ok' ];then
cd $wdir
fi
if [ $toolsok == 'ok' ];then
cp -f $wdir/files/VuetableCssConfig.js $wdir/node_modules/vuetable-2/src/components/VuetableCssConfig.js
cat << FOE > $wdir/src-local/ecosystem.config.js
module.exports = {
"apps": [
{
"name" : "server",
"autorestart" : true,
"watch" : true,
"cwd" : "$wdir/src-local",
"script" : "./llo/new.js",
"run_as_user" : "node",
"args" : "start",
"pid_file" : "$wdir/src-local/pid.pid",
"log_type" : "json",
"log_file" : "$wdir/src-local/logs/logfile",
"error_file" : "$wdir/src-local/logs/errorfile",
"out_file" : "$wdir/src-local/logs/outfile",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"merge_logs" : true,
"exec_mode" : "fork",
"max_restarts": 10,
"max_memory_restart": "500M",
"restart_delay": 1000
},
]
}
FOE
fi

25
src-local/ecosystem.config-backup.js

@ -0,0 +1,25 @@
module.exports = {
"apps": [
{
"name" : "server",
"autorestart" : true,
"watch" : true,
"cwd" : "/data/appl/ok/swarmlab-hybrid-agent/src-local",
"script" : "./llo/new.js",
"run_as_user" : "node",
"args" : "start",
"pid_file" : "/data/appl/ok/swarmlab-hybrid-agent/src-local/pid.pid",
"log_type" : "json",
"log_file" : "/data/appl/ok/swarmlab-hybrid-agent/src-local/logs/logfile",
"error_file" : "/data/appl/ok/swarmlab-hybrid-agent/src-local/logs/errorfile",
"out_file" : "/data/appl/ok/swarmlab-hybrid-agent/src-local/logs/outfile",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"merge_logs" : true,
"exec_mode" : "fork",
"max_restarts": 10,
"max_memory_restart": "500M",
"restart_delay": 1000
},
]
}

2
src-local/logs/logfile

@ -399,3 +399,5 @@
{"message":"27986\n","timestamp":"2020-12-31 02:50 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"2156\n","timestamp":"2020-12-31 02:54 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"10235\n","timestamp":"2020-12-31 03:01 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"server up and running at 3000 port\n","timestamp":"2021-01-11 00:11 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"server up and running at 3000 port\n","timestamp":"2021-01-11 00:20 +02:00","type":"out","process_id":0,"app_name":"server"}

2
src-local/logs/outfile

@ -332,3 +332,5 @@
{"message":"27986\n","timestamp":"2020-12-31 02:50 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"2156\n","timestamp":"2020-12-31 02:54 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"10235\n","timestamp":"2020-12-31 03:01 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"server up and running at 3000 port\n","timestamp":"2021-01-11 00:11 +02:00","type":"out","process_id":0,"app_name":"server"}
{"message":"server up and running at 3000 port\n","timestamp":"2021-01-11 00:20 +02:00","type":"out","process_id":0,"app_name":"server"}

2
src-local/pid-0.pid

@ -1 +1 @@
14534
32013
Loading…
Cancel
Save