Skip to content

Commit

Permalink
Fix restore
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Aug 24, 2024
1 parent 3ab7aaa commit 367bde4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/executor/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ export default async function runConfig(config, domain, writer, sandbox = false)
await writeLog("$> virtualmin restore-domain");
await virtExec("restore-domain", value, {
domain,
option: (!value.feature || !value.feature.includes('home')) ? [['dir', 'delete', '1']] : false,
'fix': true,
'reuid': true,
'skip-warnings': true,
'all-features': !value.feature,
});
break;
case 'delete':
Expand Down
6 changes: 5 additions & 1 deletion src/executor/virtualmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ class VirtualminExecutor {
p.push(escapeShell(k));
else if (Array.isArray(v))
v.forEach(e => {
p.push(escapeShell(k), escapeShell(e));
if (Array.isArray(e)) {
p.push(escapeShell(k), ...e.map(ee => escapeShell(ee)));
} else {
p.push(escapeShell(k), escapeShell(e));
}
});
else
p.push(escapeShell(k), escapeShell(v));
Expand Down

0 comments on commit 367bde4

Please sign in to comment.