diff --git a/package.json b/package.json index a8986cb..ada937c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "domcloud-bridge", - "version": "0.31.0", + "version": "0.31.1", "description": "Deployment runner for DOM Cloud", "main": "app.js", "engines": { diff --git a/src/executor/runner.js b/src/executor/runner.js index 76c5e57..a2fa5fb 100644 --- a/src/executor/runner.js +++ b/src/executor/runner.js @@ -709,6 +709,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, } } if (config.source || config.commands) { + await sshExec(`shopt -s dotglob`, false); await sshExec(`export DOMAIN='${subdomain}'`, false); await sshExec(`mkdir -p ${subdomaindata['Home directory']}/public_html && cd "$_"`); } @@ -737,7 +738,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, } } } - let executedCMD = [`shopt -s dotglob`, `rm -rf *`]; + let executedCMD = [`rm -rf *`]; let executedCMDNote = ''; if (source.url === 'clear') { // we just delete them all @@ -770,7 +771,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, } if (url.pathname.endsWith('.tar.gz')) { executedCMD.push(`wget -O _.tar.gz ` + escapeShell(url.toString())); - executedCMD.push(`tar -xvzf _.tar.gz ; rm _.tar.gz ; chmod -R 0750 *`); + executedCMD.push(`tar -xzf _.tar.gz ; rm _.tar.gz ; chmod -R 0750 *`); } else { executedCMD.push(`wget -O _.zip ` + escapeShell(url.toString())); executedCMD.push(`unzip -q -o _.zip ; rm _.zip ; chmod -R 0750 *`); @@ -781,7 +782,6 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, } executedCMDNote = 'Downloading files'; } - executedCMD.push(`shopt -u dotglob`); if (firewallOn) { await iptablesExec.setDelUser(domaindata['Username']); }