mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 12:06:55 +02:00
Allow Redis DB# select.
This commit is contained in:
parent
cfd92cb18d
commit
05f5755bb1
2 changed files with 6 additions and 0 deletions
3
netconf-service/config.js
Normal file
3
netconf-service/config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
//exports.redisDb = 0; // live
|
||||
exports.redisDb = 1; // test
|
||||
//exports.redisDb = 2; // dev
|
|
@ -25,6 +25,8 @@
|
|||
// LLC. Start here: http://www.zerotier.com/
|
||||
//
|
||||
|
||||
var config = require('./config.js');
|
||||
|
||||
// Fields in netconf response dictionary
|
||||
var ZT_NETWORKCONFIG_DICT_KEY_ALLOWED_ETHERNET_TYPES = "et";
|
||||
var ZT_NETWORKCONFIG_DICT_KEY_NETWORK_ID = "nwid";
|
||||
|
@ -53,6 +55,7 @@ var async = require('async');
|
|||
var redis = require('redis');
|
||||
var DB = redis.createClient();
|
||||
DB.on("error",function(err) { console.error('redis query error: '+err); });
|
||||
DB.select(config.redisDb,function() {});
|
||||
|
||||
// Global variables -- these are initialized on startup or netconf-init message
|
||||
var netconfSigningIdentity = null; // identity of netconf master, with private key portion
|
||||
|
|
Loading…
Add table
Reference in a new issue