|
|
|
@ -750,11 +750,14 @@ int main(int argc, char **argv)
|
|
|
|
|
memset(&ckp, 0, sizeof(ckp)); |
|
|
|
|
ckp.loglevel = LOG_NOTICE; |
|
|
|
|
|
|
|
|
|
while ((c = getopt(argc, argv, "c:g:kl:n:ps:")) != -1) { |
|
|
|
|
while ((c = getopt(argc, argv, "c:d:g:kl:n:pS:s:")) != -1) { |
|
|
|
|
switch (c) { |
|
|
|
|
case 'c': |
|
|
|
|
ckp.config = optarg; |
|
|
|
|
break; |
|
|
|
|
case 'd': |
|
|
|
|
ckp.ckdb_name = optarg; |
|
|
|
|
break; |
|
|
|
|
case 'g': |
|
|
|
|
ckp.grpnam = optarg; |
|
|
|
|
break; |
|
|
|
@ -774,6 +777,8 @@ int main(int argc, char **argv)
|
|
|
|
|
case 'p': |
|
|
|
|
ckp.proxy = true; |
|
|
|
|
break; |
|
|
|
|
case 'S': |
|
|
|
|
ckp.ckdb_sockdir = strdup(optarg); |
|
|
|
|
case 's': |
|
|
|
|
ckp.socket_dir = strdup(optarg); |
|
|
|
|
break; |
|
|
|
@ -809,6 +814,16 @@ int main(int argc, char **argv)
|
|
|
|
|
} |
|
|
|
|
trail_slash(&ckp.socket_dir); |
|
|
|
|
|
|
|
|
|
if (!ckp.ckdb_name) |
|
|
|
|
ckp.ckdb_name = "ckdb"; |
|
|
|
|
if (!ckp.ckdb_sockdir) { |
|
|
|
|
ckp.ckdb_sockdir = strdup("/opt/"); |
|
|
|
|
realloc_strcat(&ckp.ckdb_sockdir, ckp.ckdb_name); |
|
|
|
|
} |
|
|
|
|
trail_slash(&ckp.ckdb_sockdir); |
|
|
|
|
ckp.ckdb_sockname = ckp.ckdb_sockdir; |
|
|
|
|
realloc_strcat(&ckp.ckdb_sockdir, "listener"); |
|
|
|
|
|
|
|
|
|
/* Ignore sigpipe */ |
|
|
|
|
signal(SIGPIPE, SIG_IGN); |
|
|
|
|
|
|
|
|
|