diff --git a/src/executor/runner.js b/src/executor/runner.js index 0a2ee3e..b3fe196 100644 --- a/src/executor/runner.js +++ b/src/executor/runner.js @@ -69,7 +69,7 @@ export default async function runConfig(config, domain, writer, sandbox = false) // sometimes we need to wait for the domain to be created await writeLog("$> virtualmin list-domains"); await new Promise((resolve, reject) => { - setTimeout(resolve, 3000); + setTimeout(resolve, 1000); }); await new Promise((resolve, reject) => { let tries = 0; @@ -237,7 +237,6 @@ export default async function runConfig(config, domain, writer, sandbox = false) await virtExec("backup-domain", value, { user, 'all-features': true, - 'as-owner': true, 'ignore-errors': true, }); break; diff --git a/src/executor/runnercode.js b/src/executor/runnercode.js index 19a39c3..cff61f0 100644 --- a/src/executor/runnercode.js +++ b/src/executor/runnercode.js @@ -18,12 +18,13 @@ export async function runConfigCodeFeatures(key, value, writeLog, domaindata, ss break; case 'docker': await sshExec(`export XDG_RUNTIME_DIR=/run/user/$(id -u)`, false); + await sshExec(`export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock`, false); await sshExec(`export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus`, false); if (value === '' || value === 'on') { await writeLog("$> Enabling docker features"); await writeLog(await dockerExec.enableDocker(domaindata['Username'])); await sshExec(`sed -i '/DOCKER_HOST=/d' ~/.bashrc`, false); - await sshExec(`echo "export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> ~/.bashrc; source ~/.bashrc`); + await sshExec(`echo "export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> ~/.bashrc;`); await sshExec(`mkdir -p ~/.config/docker; echo '{"exec-opts": ["native.cgroupdriver=cgroupfs"]}' > ~/.config/docker/daemon.json`); await sshExec(`dockerd-rootless-setuptool.sh install`); } else if (value === 'off') {