mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added "interface" option
SVN revision: 2482
This commit is contained in:
parent
148cd20795
commit
bacf488643
@ -29867,12 +29867,13 @@ int main(int argc, char *argv[])
|
|||||||
else {
|
else {
|
||||||
usage:printf("%s\n", ELOGID);
|
usage:printf("%s\n", ELOGID);
|
||||||
printf("usage: elogd [-C <url>] [-c <file>] [-D] [-d <dir>] ");
|
printf("usage: elogd [-C <url>] [-c <file>] [-D] [-d <dir>] ");
|
||||||
printf("[-f <file>] [-h] [-k] [-l <logbook>] [-M] [-m] [-n <hostname>] ");
|
printf("[-f <file>] [-h] [-k] [-l <logbook>] [-M] [-m] [-n <interface>] ");
|
||||||
printf("[-p <port>] [-S] [-s <dir>] [-t <pwd>] [-v] [-x]\n\n");
|
printf("[-p <port>] [-S] [-s <dir>] [-t <pwd>] [-v] [-x]\n\n");
|
||||||
printf(" -C <url> clone remote elogd configuration\n");
|
printf(" -C <url> clone remote elogd configuration\n");
|
||||||
printf(" -c <file> specify configuration file\n");
|
printf(" -c <file> specify configuration file\n");
|
||||||
printf(" -M synchronize with removing deleted entries\n");
|
printf(" -M synchronize with removing deleted entries\n");
|
||||||
printf(" -m synchronize logbook(s) with remote server\n");
|
printf(" -m synchronize logbook(s) with remote server\n");
|
||||||
|
printf(" -n specify interface to listen at\n");
|
||||||
printf(" -D become a daemon\n");
|
printf(" -D become a daemon\n");
|
||||||
printf(" -d <dir> specify logbook root directory\n");
|
printf(" -d <dir> specify logbook root directory\n");
|
||||||
#ifdef OS_UNIX
|
#ifdef OS_UNIX
|
||||||
@ -30124,6 +30125,12 @@ int main(int argc, char *argv[])
|
|||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* get listen interface */
|
||||||
|
if (listen_interface[0] == 0)
|
||||||
|
if (getcfg("global", "interface", str, sizeof(str))) {
|
||||||
|
strlcpy(listen_interface, str, sizeof(listen_interface));
|
||||||
|
}
|
||||||
|
|
||||||
/* get default port */
|
/* get default port */
|
||||||
if (getcfg("global", "SSL", str, sizeof(str)) && atoi(str) == 1)
|
if (getcfg("global", "SSL", str, sizeof(str)) && atoi(str) == 1)
|
||||||
elog_tcp_port = 443;
|
elog_tcp_port = 443;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user