new
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user