- attivita
- gestione degli script sul server - creato websocket per interagire con gli script del server.
This commit is contained in:
@@ -759,7 +759,7 @@ const MyTelegramBot = {
|
||||
|
||||
const cl = getclTelegByidapp(idapp);
|
||||
if (cl && idtelegram) {
|
||||
|
||||
|
||||
return await cl.sendMsg(idtelegram, text, null, MyForm, message_id,
|
||||
chat_id, ripr_menuPrec);
|
||||
}
|
||||
@@ -2024,7 +2024,7 @@ class Telegram {
|
||||
if (rec.user && cmd2) {
|
||||
let isAdmin = rec.user ? rec.user.profile.admin_telegram : false;
|
||||
if (isAdmin) {
|
||||
const ris = await tools.execScript(this.idapp, msg, cmd2, 'Eseguo lo script');
|
||||
const ris = await tools.execScriptByTelegram(this.idapp, msg, cmd2, 'Eseguo lo script');
|
||||
}
|
||||
}
|
||||
} else if (cmd1 === Menu.LOG_SRV) {
|
||||
@@ -2486,7 +2486,7 @@ class Telegram {
|
||||
file = '~/batch/test_restart_server.sh';
|
||||
}
|
||||
|
||||
const ris = await tools.execScript(this.idapp, msg, file,
|
||||
const ris = await tools.execScriptByTelegram(this.idapp, msg, file,
|
||||
this.chisono(rec) + ' Restart il Server (Node.Js) : ' + process.version);
|
||||
} else {
|
||||
this.nonAbilitato(msg);
|
||||
@@ -2495,7 +2495,7 @@ class Telegram {
|
||||
|
||||
async menuLogSrv(rec, msg, cmd2) {
|
||||
if (cmd2 === '6711') {
|
||||
const ris = await tools.execScript(this.idapp, msg, '~/batch/logserver.sh', this.chisono(rec) + ' Visualizzo il Log del Server...');
|
||||
const ris = await tools.execScriptByTelegram(this.idapp, msg, '~/batch/logserver.sh', this.chisono(rec) + ' Visualizzo il Log del Server...');
|
||||
} else {
|
||||
this.nonAbilitato(msg);
|
||||
}
|
||||
@@ -2504,7 +2504,7 @@ class Telegram {
|
||||
async menuRebootSrv(rec, msg, cmd2) {
|
||||
if (cmd2 === '6711') {
|
||||
await MyTelegramBot.sendMsgTelegramToTheAdminAllSites(this.chisono(rec) + ' ha effettuato il Reboot del Server! ...');
|
||||
const ris = await tools.execScript(this.idapp, msg, '~/batch/esegui_reboot.sh',
|
||||
const ris = await tools.execScriptByTelegram(this.idapp, msg, '~/batch/esegui_reboot.sh',
|
||||
this.chisono(rec) + ' Eseguo il Reboot del Server !...');
|
||||
} else {
|
||||
this.nonAbilitato(msg);
|
||||
|
||||
Reference in New Issue
Block a user