Skip to content

Commit

Permalink
adjust check config
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jan 4, 2024
1 parent 2f1cae6 commit 03cdf99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/haproxyTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ async function writeConfig(configName, data) {

async function checkConfig(configName) {
const response = await cmdAsync(`sudo haproxy -f ${configName} -c`);
return response.includes('Configuration file is valid');
const configOK = (response.includes('Configuration file is valid') || response.includes('Warnings were found.'));
return configOK;
}

async function restartProxy(dataToWrite) {
Expand Down

0 comments on commit 03cdf99

Please sign in to comment.