Atualização automática: 2026-05-23 23:20:29
This commit is contained in:
@@ -424,7 +424,7 @@
|
|||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<label><i class="fas fa-folder-open"></i> OU Informar Caminho Específico da Pasta (Host/Diretório)</label>
|
<label><i class="fas fa-folder-open"></i> OU Informar Caminho Específico da Pasta (Host/Diretório)</label>
|
||||||
<input type="text" id="designerCustomPath" class="form-control" placeholder="ex: /root/Desktop/Clonados/meu_site">
|
<input type="text" id="designerCustomPath" class="form-control" placeholder="ex: /root/Desktop/CLONE_SITE/meu_site">
|
||||||
<small class="text-muted">Se preenchido, o agente usará esta pasta exata ignorando a seleção acima.</small>
|
<small class="text-muted">Se preenchido, o agente usará esta pasta exata ignorando a seleção acima.</small>
|
||||||
</div>
|
</div>
|
||||||
<button id="startDesignBtn" class="btn btn-primary">
|
<button id="startDesignBtn" class="btn btn-primary">
|
||||||
|
|||||||
@@ -308,8 +308,8 @@ app.post('/api/wget-clone', async (req, res) => {
|
|||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const containerId = require('os').hostname();
|
const containerId = require('os').hostname();
|
||||||
const cloneDir = directory.split('/').pop();
|
const cloneDir = directory.split('/').pop();
|
||||||
const hostDir = req.body.outputDir || '/root/Desktop/Clonados';
|
const hostDir = req.body.outputDir || '/root/Desktop/CLONE_SITE';
|
||||||
exec(`mkdir -p ${hostDir} && cp -r ${directory} ${hostDir}/ 2>/dev/null || docker cp ${containerId}:${directory} ${hostDir}/ 2>/dev/null`, (err) => {
|
exec(`mkdir -p "${hostDir}" && cp -r "${directory}" "${hostDir}/" 2>/dev/null || docker cp ${containerId}:"${directory}" "${hostDir}/" 2>/dev/null`, (err) => {
|
||||||
if (err) console.log('⚠️ Sync to host failed:', err.message);
|
if (err) console.log('⚠️ Sync to host failed:', err.message);
|
||||||
else console.log('✅ Clone synced to host Desktop:', cloneDir);
|
else console.log('✅ Clone synced to host Desktop:', cloneDir);
|
||||||
});
|
});
|
||||||
@@ -388,8 +388,8 @@ app.post('/api/smart-clone', (req, res) => {
|
|||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const containerId = require('os').hostname();
|
const containerId = require('os').hostname();
|
||||||
const cloneDir = directory.split('/').pop();
|
const cloneDir = directory.split('/').pop();
|
||||||
const hostDir = req.body.outputDir || '/root/Desktop/Clonados';
|
const hostDir = req.body.outputDir || '/root/Desktop/CLONE_SITE';
|
||||||
exec(`mkdir -p ${hostDir} && cp -r ${directory} ${hostDir}/ 2>/dev/null || docker cp ${containerId}:${directory} ${hostDir}/ 2>/dev/null`, (err) => {
|
exec(`mkdir -p "${hostDir}" && cp -r "${directory}" "${hostDir}/" 2>/dev/null || docker cp ${containerId}:"${directory}" "${hostDir}/" 2>/dev/null`, (err) => {
|
||||||
if (err) console.log('⚠️ SmartClone sync to host failed:', err.message);
|
if (err) console.log('⚠️ SmartClone sync to host failed:', err.message);
|
||||||
else console.log('✅ SmartClone synced to host Desktop:', cloneDir);
|
else console.log('✅ SmartClone synced to host Desktop:', cloneDir);
|
||||||
});
|
});
|
||||||
@@ -831,7 +831,7 @@ p, span, li, label, td, th {
|
|||||||
|
|
||||||
// 3. Sincronizar o novo diretório com o host (somente se NÃO for customPath, pois customPath já está no lugar certo)
|
// 3. Sincronizar o novo diretório com o host (somente se NÃO for customPath, pois customPath já está no lugar certo)
|
||||||
if (!isCustomPath) {
|
if (!isCustomPath) {
|
||||||
const hostDir = outputDir || '/root/Desktop/Clonados';
|
const hostDir = outputDir || '/root/Desktop/CLONE_SITE';
|
||||||
const containerId = require('os').hostname();
|
const containerId = require('os').hostname();
|
||||||
exec(`mkdir -p "${hostDir}" && cp -r "${newFolderPath}" "${hostDir}/" 2>/dev/null || docker cp ${containerId}:"${newFolderPath}" "${hostDir}/" 2>/dev/null`, (syncErr) => {
|
exec(`mkdir -p "${hostDir}" && cp -r "${newFolderPath}" "${hostDir}/" 2>/dev/null || docker cp ${containerId}:"${newFolderPath}" "${hostDir}/" 2>/dev/null`, (syncErr) => {
|
||||||
if (syncErr) console.log('⚠️ Redesign sync to host failed:', syncErr.message);
|
if (syncErr) console.log('⚠️ Redesign sync to host failed:', syncErr.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user