From 9b1bd559ae3fc355bc5195d091038580aa72991f Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sat, 26 Oct 2024 14:17:46 +0700 Subject: [PATCH] Update db password --- package-lock.json | 4 ++-- package.json | 2 +- src/executor/runner.js | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 731a090..9c9fcff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "domcloud-bridge", - "version": "0.65.0", + "version": "0.66.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "domcloud-bridge", - "version": "0.65.0", + "version": "0.66.0", "license": "MIT", "dependencies": { "cli": "^1.0.1", diff --git a/package.json b/package.json index f6580ad..0d181d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "domcloud-bridge", - "version": "0.65.0", + "version": "0.66.0", "description": "Deployment runner for DOM Cloud", "main": "app.js", "engines": { diff --git a/src/executor/runner.js b/src/executor/runner.js index b659d2e..1e7b34e 100644 --- a/src/executor/runner.js +++ b/src/executor/runner.js @@ -213,6 +213,24 @@ export default async function runConfig(config, domain, writer, sandbox = false) await virtExec("modify-domain", value, { domain, }); + if (value.pass) { + await writeLog("$> virtualmin modify-database-pass mysql"); + if (domaindata['Features']?.includes('mysql')) { + await virtExec("modify-database-pass", { + domain, + pass: value.pass, + type: 'mysql', + }); + } + if (domaindata['Features']?.includes('postgres')) { + await writeLog("$> virtualmin modify-database-pass postgres"); + await virtExec("modify-database-pass", { + domain, + pass: value.pass, + type: 'postgres', + }); + } + } break; case 'rename': if (value && value["new-user"] && await firewallStatus()) {