mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: configure "redis-cli" commands password
parent
1a0713ebbb
commit
c87559626e
|
@ -187,6 +187,10 @@ public class OpenviduConfig {
|
||||||
return this.coturnRedisDbname;
|
return this.coturnRedisDbname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCoturnDatabasePassword() {
|
||||||
|
return this.coturnRedisPassword;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getKmsUris() {
|
public List<String> getKmsUris() {
|
||||||
return kmsUrisList;
|
return kmsUrisList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,9 +55,11 @@ public class BashCoturnCredentialsService extends CoturnCredentialsService {
|
||||||
log.info("Path of COTURN log files: " + this.logPath);
|
log.info("Path of COTURN log files: " + this.logPath);
|
||||||
}
|
}
|
||||||
response = CommandExecutor.execCommand("/bin/sh", "-c",
|
response = CommandExecutor.execCommand("/bin/sh", "-c",
|
||||||
"redis-cli -n " + this.openviduConfig.getCoturnDatabaseDbname() + " flushdb");
|
"redis-cli -a " + this.openviduConfig.getCoturnDatabasePassword() + " -n "
|
||||||
|
+ this.openviduConfig.getCoturnDatabaseDbname() + " flushdb");
|
||||||
String response2 = CommandExecutor.execCommand("/bin/sh", "-c",
|
String response2 = CommandExecutor.execCommand("/bin/sh", "-c",
|
||||||
"redis-cli -n " + this.openviduConfig.getCoturnDatabaseDbname() + " --scan --pattern '*'");
|
"redis-cli -a " + this.openviduConfig.getCoturnDatabasePassword() + " -n "
|
||||||
|
+ this.openviduConfig.getCoturnDatabaseDbname() + " --scan --pattern '*'");
|
||||||
if ("OK".equals(response) && response2.isEmpty()) {
|
if ("OK".equals(response) && response2.isEmpty()) {
|
||||||
log.info("COTURN DB is now empty");
|
log.info("COTURN DB is now empty");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue