This commit is contained in:
Shengliang Guan 2020-08-08 17:52:48 +08:00
parent 7444fe7a84
commit ab6151cd90
5 changed files with 19 additions and 7 deletions

View File

@ -147,12 +147,12 @@ int32_t tsMonitorInterval = 30; // seconds
// internal // internal
int32_t tscEmbedded = 0; int32_t tscEmbedded = 0;
char configDir[TSDB_FILENAME_LEN] = "/etc/taos"; char configDir[TSDB_FILENAME_LEN] = {0};
char tsVnodeDir[TSDB_FILENAME_LEN] = {0}; char tsVnodeDir[TSDB_FILENAME_LEN] = {0};
char tsDnodeDir[TSDB_FILENAME_LEN] = {0}; char tsDnodeDir[TSDB_FILENAME_LEN] = {0};
char tsMnodeDir[TSDB_FILENAME_LEN] = {0}; char tsMnodeDir[TSDB_FILENAME_LEN] = {0};
char tsDataDir[TSDB_FILENAME_LEN] = "/var/lib/taos"; char tsDataDir[TSDB_FILENAME_LEN] = {0};
char tsScriptDir[TSDB_FILENAME_LEN] = "/etc/taos"; char tsScriptDir[TSDB_FILENAME_LEN] = {0};
char tsVnodeBakDir[TSDB_FILENAME_LEN] = {0}; char tsVnodeBakDir[TSDB_FILENAME_LEN] = {0};
/* /*

View File

@ -18,7 +18,10 @@
#include "tglobal.h" #include "tglobal.h"
void osInit() { void osInit() {
strcpy(configDir, "/etc/taos"); if (configDir[0] == 0) {
strcpy(configDir, "/etc/taos");
}
strcpy(tsVnodeDir, ""); strcpy(tsVnodeDir, "");
strcpy(tsDnodeDir, ""); strcpy(tsDnodeDir, "");
strcpy(tsMnodeDir, ""); strcpy(tsMnodeDir, "");

View File

@ -18,7 +18,10 @@
#include "tglobal.h" #include "tglobal.h"
void osInit() { void osInit() {
strcpy(configDir, "~/TDengine/cfg"); if (configDir[0] == 0) {
strcpy(configDir, "~/TDengine/cfg");
}
strcpy(tsVnodeDir, ""); strcpy(tsVnodeDir, "");
strcpy(tsDnodeDir, ""); strcpy(tsDnodeDir, "");
strcpy(tsMnodeDir, ""); strcpy(tsMnodeDir, "");

View File

@ -18,7 +18,10 @@
#include "tglobal.h" #include "tglobal.h"
void osInit() { void osInit() {
strcpy(configDir, "/etc/taos"); if (configDir[0] == 0) {
strcpy(configDir, "/etc/taos");
}
strcpy(tsVnodeDir, ""); strcpy(tsVnodeDir, "");
strcpy(tsDnodeDir, ""); strcpy(tsDnodeDir, "");
strcpy(tsMnodeDir, ""); strcpy(tsMnodeDir, "");

View File

@ -21,7 +21,10 @@
extern void taosWinSocketInit(); extern void taosWinSocketInit();
void osInit() { void osInit() {
strcpy(configDir, "C:/TDengine/cfg"); if (configDir[0] == 0) {
strcpy(configDir, "~/TDengine/cfg");
}
strcpy(tsVnodeDir, "C:/TDengine/data"); strcpy(tsVnodeDir, "C:/TDengine/data");
strcpy(tsDnodeDir, ""); strcpy(tsDnodeDir, "");
strcpy(tsMnodeDir, ""); strcpy(tsMnodeDir, "");