|
|
@ -750,11 +750,14 @@ int main(int argc, char **argv) |
|
|
|
memset(&ckp, 0, sizeof(ckp)); |
|
|
|
memset(&ckp, 0, sizeof(ckp)); |
|
|
|
ckp.loglevel = LOG_NOTICE; |
|
|
|
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) { |
|
|
|
switch (c) { |
|
|
|
case 'c': |
|
|
|
case 'c': |
|
|
|
ckp.config = optarg; |
|
|
|
ckp.config = optarg; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case 'd': |
|
|
|
|
|
|
|
ckp.ckdb_name = optarg; |
|
|
|
|
|
|
|
break; |
|
|
|
case 'g': |
|
|
|
case 'g': |
|
|
|
ckp.grpnam = optarg; |
|
|
|
ckp.grpnam = optarg; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -774,6 +777,8 @@ int main(int argc, char **argv) |
|
|
|
case 'p': |
|
|
|
case 'p': |
|
|
|
ckp.proxy = true; |
|
|
|
ckp.proxy = true; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case 'S': |
|
|
|
|
|
|
|
ckp.ckdb_sockdir = strdup(optarg); |
|
|
|
case 's': |
|
|
|
case 's': |
|
|
|
ckp.socket_dir = strdup(optarg); |
|
|
|
ckp.socket_dir = strdup(optarg); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -809,6 +814,16 @@ int main(int argc, char **argv) |
|
|
|
} |
|
|
|
} |
|
|
|
trail_slash(&ckp.socket_dir); |
|
|
|
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 */ |
|
|
|
/* Ignore sigpipe */ |
|
|
|
signal(SIGPIPE, SIG_IGN); |
|
|
|
signal(SIGPIPE, SIG_IGN); |
|
|
|
|
|
|
|
|
|
|
|