From 23f9273ba332a8e7735e34b3a2b7af70d3d2a6ef Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 15 Jul 2024 02:02:56 +0300 Subject: [PATCH] Take use_antietcd setting from /etc/vitastor/vitastor.conf too --- mon/mon.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mon/mon.js b/mon/mon.js index 3749b945..31355d35 100644 --- a/mon/mon.js +++ b/mon/mon.js @@ -22,6 +22,11 @@ class Mon { static async run_forever(config) { + if (fs.existsSync(config.config_path||'/etc/vitastor/vitastor.conf')) + { + const fileConfig = JSON.parse(fs.readFileSync(config.config_path||'/etc/vitastor/vitastor.conf', { encoding: 'utf-8' })); + config = { ...fileConfig, config }; + } let antietcd = await AntiEtcdAdapter.start_antietcd(config); let mon; const run = () =>