shell: add options to exec

This commit is contained in:
Girish Ramakrishnan
2024-02-20 21:11:09 +01:00
parent 7ce5b53753
commit 26eb739b46
9 changed files with 45 additions and 44 deletions

View File

@@ -160,8 +160,8 @@ async function configureMail(mailFqdn, mailDomain, serviceConfig) {
// if the 'yellowtent' user of OS and the 'cloudron' user of mail container don't match, the keys become inaccessible by mail code
if (!safe.fs.chmodSync(mailKeyFilePath, 0o644)) throw new BoxError(BoxError.FS_ERROR, `Could not chmod key file: ${safe.error.message}`);
await shell.promises.exec('stopMail', 'docker stop mail || true');
await shell.promises.exec('removeMail', 'docker rm -f mail || true');
await shell.promises.exec('stopMail', 'docker stop mail || true', {});
await shell.promises.exec('removeMail', 'docker rm -f mail || true', {});
const allowInbound = await createMailConfig(mailFqdn);
@@ -190,7 +190,7 @@ async function configureMail(mailFqdn, mailDomain, serviceConfig) {
--label isCloudronManaged=true \
${readOnly} -v /run -v /tmp ${image} ${cmd}`;
await shell.promises.exec('startMail', runCmd);
await shell.promises.exec('startMail', runCmd, {});
}
async function restart() {