This commit is contained in:
2018-12-20 22:06:06 +08:00
parent 6b4ec16652
commit 7f92cd3156
14 changed files with 94 additions and 93 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
/**
*
* ioBroker node-red Adapter
* yunkong2 node-red Adapter
*
* (c) 2014 bluefox<bluefox@ccu.io>
*
@@ -289,7 +289,7 @@ function writeStateList(callback) {
}
}
fs.writeFileSync(nodePath + '/public/iobroker.json', JSON.stringify(obj));
fs.writeFileSync(nodePath + '/public/yunkong2.json', JSON.stringify(obj));
if (callback) callback(err);
});
}
@@ -393,14 +393,14 @@ function installNotifierCreds(isFirst) {
function main() {
// Find userdata directory
// normally /opt/iobroker/node_modules/iobroker.js-controller
// but can be /example/ioBroker.js-controller
// normally /opt/yunkong2/node_modules/yunkong2.js-controller
// but can be /example/yunkong2.js-controller
const controllerDir = utils.controllerDir;
const parts = controllerDir.split('/');
if (parts.length > 1 && parts[parts.length - 2] === 'node_modules') {
parts.splice(parts.length - 2, 2);
userdataDir = parts.join('/');
userdataDir += '/iobroker-data/node-red/';
userdataDir += '/yunkong2-data/node-red/';
}
// create userdata directory