Skip to content

Commit

Permalink
Remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
callemand committed Sep 27, 2023
1 parent 55e0f59 commit 6d00f5b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions server/services/node-red/lib/configureContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ async function configureContainer(config) {

const { basePathOnContainer } = await this.gladys.system.getGladysBasePath();

logger.info('Nodered: basePathOnContainer', basePathOnContainer);

// Create configuration path (if not exists)
const configFilepath = path.join(basePathOnContainer, DEFAULT.CONFIGURATION_PATH);
logger.info('Node-RED: configFilepath', configFilepath);
await fs.mkdir(path.dirname(configFilepath), { recursive: true });
try {
await fs.chown(path.dirname(configFilepath), 1000, 1000);
Expand All @@ -45,14 +42,11 @@ async function configureContainer(config) {
let fileContentString = fileContent.toString();

let configChanged = false;
logger.info('Node-RED: Config', config.nodeRedUsername, config.nodeRedPassword);
if (config.nodeRedPassword && config.nodeRedUsername) {
// Check for changes
const [, username] = fileContentString.match(/username: '(.+)'/);
const [, password] = fileContentString.match(/password: '(.+)'/);

logger.info('Node-RED: extracted ', username, password);

if (
username !== config.nodeRedUsername ||
(await passwordUtils.compare(config.nodeRedPassword, password)) === false
Expand All @@ -61,8 +55,6 @@ async function configureContainer(config) {
fileContentString = fileContentString.replace(/username: '(.+)'/, `username: '${config.nodeRedUsername}'`);
fileContentString = fileContentString.replace(/password: '(.+)'/, `password: '${encodedPassword}'`);

logger.info('Node-RED: writed ', username, encodedPassword);

configChanged = true;
}
}
Expand Down
2 changes: 0 additions & 2 deletions server/services/node-red/lib/disconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ async function disconnect() {

const { basePathOnContainer } = await this.gladys.system.getGladysBasePath();

logger.info('Nodered: basePathOnContainer', basePathOnContainer);

const configFilepath = path.join(basePathOnContainer, DEFAULT.CONFIGURATION_PATH);

await fs.rm(path.dirname(configFilepath), { recursive: true });
Expand Down
1 change: 0 additions & 1 deletion server/services/node-red/lib/installContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ async function installContainer(config) {
}

const { basePathOnHost } = await this.gladys.system.getGladysBasePath();
logger.info('Nodered: basePathOnHost', basePathOnHost);

let dockerContainers = await this.gladys.system.getContainers({
all: true,
Expand Down

0 comments on commit 6d00f5b

Please sign in to comment.