fix central docker launch without redis

This commit is contained in:
Grant Limberg 2021-09-15 09:21:41 -07:00
parent c3a42bf590
commit 3b375b55c2
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

@ -1074,7 +1074,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);
}