fix central docker launch without redis

This commit is contained in:
Grant Limberg 2021-09-15 09:21:41 -07:00
parent 9c6ec2c52e
commit 27ce787fbd
No known key found for this signature in database
GPG Key ID: 2BA62CCABBB4095A
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ if [ "$ZT_USE_REDIS" == "true" ]; then
}
"
else
REDIS="\"redis\": {}"
REDIS="\"redis\": null"
fi
mkdir -p /var/lib/zerotier-one

View File

@ -1071,7 +1071,7 @@ public:
if (redis.is_object() && _rc == NULL) {
_rc = new RedisConfig;
_rc->hostname = OSUtils::jsonString(redis["hostname"],"");
_rc->port = redis["port"];
_rc->port = OSUtils::jsonInt(redis["port"],0);
_rc->password = OSUtils::jsonString(redis["password"],"");
_rc->clusterMode = OSUtils::jsonBool(redis["clusterMode"], false);
}