mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-01-03 14:56:43 -05:00
Added option -v to display version number and build date
This commit is contained in:
parent
3870019900
commit
e7dcd868c0
1
README
1
README
@ -43,6 +43,7 @@ Command line options:
|
||||
-nr Disable root user checking (for debugging)
|
||||
|
||||
-d Debug to syslog (not for production use)
|
||||
-v Display version number and build date
|
||||
-b Display the BSD license
|
||||
-? Display this help
|
||||
|
||||
|
@ -97,7 +97,7 @@ void parse_args(state *st, int argc, char *argv[])
|
||||
int opt;
|
||||
|
||||
/* Parse args */
|
||||
while ((opt = getopt(argc, argv, "h:p:r:t:g:a:c:u:m:l:w:o:s:i:k:f:e:R:D:L:A:P:n:db?-")) != ERROR) {
|
||||
while ((opt = getopt(argc, argv, "h:p:r:t:g:a:c:u:m:l:w:o:s:i:k:f:e:R:D:L:A:P:n:dbv?-")) != ERROR) {
|
||||
switch(opt) {
|
||||
case 'h': sstrlcpy(st->server_host, optarg); break;
|
||||
case 'p': st->server_port = atoi(optarg); break;
|
||||
@ -145,6 +145,11 @@ void parse_args(state *st, int argc, char *argv[])
|
||||
|
||||
case 'd': st->debug = TRUE; break;
|
||||
case 'b': puts(license); exit(EXIT_SUCCESS);
|
||||
|
||||
case 'v':
|
||||
printf("%s/%s \"%s\" (built %s)\n", SERVER_SOFTWARE, VERSION, CODENAME, __DATE__);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
default : puts(readme); exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user