atendeticket 2.1.19 → 2.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { runCommand } = require('../../core/exec');
|
|
2
|
+
const { info, success } = require('../../core/logger');
|
|
3
|
+
|
|
4
|
+
async function systemCreateFolder(instancia) {
|
|
5
|
+
info(`📁 Criando pasta para a instância ${instancia}...`);
|
|
6
|
+
|
|
7
|
+
const folderPath = `/home/deploy/${instancia}`;
|
|
8
|
+
|
|
9
|
+
await runCommand('sudo', ['-u', 'deploy', 'mkdir', '-p', folderPath]);
|
|
10
|
+
|
|
11
|
+
success(`Pasta ${folderPath} criada com sucesso!`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = { systemCreateFolder };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { runCommand } = require('../../core/exec');
|
|
2
|
+
const { info, success } = require('../../core/logger');
|
|
3
|
+
|
|
4
|
+
async function systemNginxRestart() {
|
|
5
|
+
info('🔄 Reiniciando Nginx...');
|
|
6
|
+
|
|
7
|
+
await runCommand('sudo', ['service', 'nginx', 'restart']);
|
|
8
|
+
|
|
9
|
+
success('Nginx reiniciado com sucesso!');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
module.exports = { systemNginxRestart };
|