summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-04-05 22:44:30 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-04-05 22:44:30 +0200
commit9000f5d67a2bab28ae925b54f6b8a6508dc77ea2 (patch)
tree941a4fb6cff4a0793cfa447782a4ebc66d663828 /opentracker.c
parent524d78d6c7552cd4c44be7cea1ccc7cdbb11b490 (diff)
minor cleanups. Breaks proxy.c
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/opentracker.c b/opentracker.c
index 9f99363..2108a98 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -48,7 +48,7 @@ static char * g_serverdir;
48static char * g_serveruser; 48static char * g_serveruser;
49static unsigned int g_udp_workers; 49static unsigned int g_udp_workers;
50 50
51static void panic( const char *routing ) __attribute__ ((noreturn)); 51static void panic( const char *routine ) __attribute__ ((noreturn));
52static void panic( const char *routine ) { 52static void panic( const char *routine ) {
53 fprintf( stderr, "%s: %s\n", routine, strerror(errno) ); 53 fprintf( stderr, "%s: %s\n", routine, strerror(errno) );
54 exit( 111 ); 54 exit( 111 );
@@ -118,9 +118,9 @@ static void help( char *name ) {
118 usage( name ); 118 usage( name );
119 119
120 HELPLINE("-f config","include and execute the config file"); 120 HELPLINE("-f config","include and execute the config file");
121 HELPLINE("-i ip","specify ip to bind to (default: *, you may specify more than one)"); 121 HELPLINE("-i ip","specify ip to bind to with next -[pP] (default: any, overrides preceeding ones)");
122 HELPLINE("-p port","specify tcp port to bind to (default: 6969, you may specify more than one)"); 122 HELPLINE("-p port","do bind to tcp port (default: 6969, you may specify more than one)");
123 HELPLINE("-P port","specify udp port to bind to (default: 6969, you may specify more than one)"); 123 HELPLINE("-P port","do bind to udp port (default: 6969, you may specify more than one)");
124 HELPLINE("-r redirecturl","specify url where / should be redirected to (default none)"); 124 HELPLINE("-r redirecturl","specify url where / should be redirected to (default none)");
125 HELPLINE("-d dir","specify directory to try to chroot to (default: \".\")"); 125 HELPLINE("-d dir","specify directory to try to chroot to (default: \".\")");
126 HELPLINE("-u user","specify user under whose privileges opentracker should run (default: \"nobody\")"); 126 HELPLINE("-u user","specify user under whose privileges opentracker should run (default: \"nobody\")");
@@ -132,6 +132,9 @@ static void help( char *name ) {
132#endif 132#endif
133 133
134 fprintf( stderr, "\nExample: ./opentracker -i 127.0.0.1 -p 6969 -P 6969 -f ./opentracker.conf -i 10.1.1.23 -p 2710 -p 80\n" ); 134 fprintf( stderr, "\nExample: ./opentracker -i 127.0.0.1 -p 6969 -P 6969 -f ./opentracker.conf -i 10.1.1.23 -p 2710 -p 80\n" );
135 fprintf( stderr, " Here -i 127.0.0.1 selects the ip address for the next -p 6969 and -P 6969.\n");
136 fprintf( stderr, " If no port is bound from config file or command line, the last address given\n");
137 fprintf( stderr, " (or ::1 if none is set) will be used on port 6969.\n");
135} 138}
136#undef HELPLINE 139#undef HELPLINE
137 140