|
@@ -170,7 +170,8 @@ DEFAULT_CPUS_NUMBER,
|
|
0, /* no_dynamic_ip_list */
|
|
0, /* no_dynamic_ip_list */
|
|
0, /* no_dynamic_realms */
|
|
0, /* no_dynamic_realms */
|
|
|
|
|
|
-0 /* log_binding */
|
|
|
|
|
|
+0, /* log_binding */
|
|
|
|
+0 /* systemd */
|
|
};
|
|
};
|
|
|
|
|
|
//////////////// OpenSSL Init //////////////////////
|
|
//////////////// OpenSSL Init //////////////////////
|
|
@@ -463,6 +464,7 @@ static char Usage[] = "Usage: turnserver [options]\n"
|
|
" -v, --verbose 'Moderate' verbose mode.\n"
|
|
" -v, --verbose 'Moderate' verbose mode.\n"
|
|
" -V, --Verbose Extra verbose mode, very annoying (for debug purposes only).\n"
|
|
" -V, --Verbose Extra verbose mode, very annoying (for debug purposes only).\n"
|
|
" -o, --daemon Start process as daemon (detach from current shell).\n"
|
|
" -o, --daemon Start process as daemon (detach from current shell).\n"
|
|
|
|
+" --systemd Notify systemd about server status. (Use only in forground!)\n"
|
|
" --no-software-attribute Production mode: hide the software version (formerly --prod).\n"
|
|
" --no-software-attribute Production mode: hide the software version (formerly --prod).\n"
|
|
" -f, --fingerprint Use fingerprints in the TURN messages.\n"
|
|
" -f, --fingerprint Use fingerprints in the TURN messages.\n"
|
|
" -a, --lt-cred-mech Use the long-term credential mechanism.\n"
|
|
" -a, --lt-cred-mech Use the long-term credential mechanism.\n"
|
|
@@ -813,7 +815,8 @@ enum EXTRA_OPTS {
|
|
NO_HTTP_OPT,
|
|
NO_HTTP_OPT,
|
|
SECRET_KEY_OPT,
|
|
SECRET_KEY_OPT,
|
|
ACME_REDIRECT_OPT,
|
|
ACME_REDIRECT_OPT,
|
|
- LOG_BINDING_OPT
|
|
|
|
|
|
+ LOG_BINDING_OPT,
|
|
|
|
+ SYSTEMD_OPT
|
|
};
|
|
};
|
|
|
|
|
|
struct myoption {
|
|
struct myoption {
|
|
@@ -949,6 +952,7 @@ static const struct myoption long_options[] = {
|
|
{ "keep-address-family", optional_argument, NULL, 'K' },
|
|
{ "keep-address-family", optional_argument, NULL, 'K' },
|
|
{ "acme-redirect", required_argument, NULL, ACME_REDIRECT_OPT },
|
|
{ "acme-redirect", required_argument, NULL, ACME_REDIRECT_OPT },
|
|
{ "log-binding", optional_argument, NULL, LOG_BINDING_OPT },
|
|
{ "log-binding", optional_argument, NULL, LOG_BINDING_OPT },
|
|
|
|
+ { "systemd", optional_argument, NULL, SYSTEMD_OPT },
|
|
|
|
|
|
{ NULL, no_argument, NULL, 0 }
|
|
{ NULL, no_argument, NULL, 0 }
|
|
};
|
|
};
|
|
@@ -1606,6 +1610,9 @@ static void set_option(int c, char *value)
|
|
case LOG_BINDING_OPT:
|
|
case LOG_BINDING_OPT:
|
|
turn_params.log_binding = get_bool_value(value);
|
|
turn_params.log_binding = get_bool_value(value);
|
|
break;
|
|
break;
|
|
|
|
+ case SYSTEMD_OPT:
|
|
|
|
+ turn_params.systemd = get_bool_value(value);
|
|
|
|
+ break;
|
|
|
|
|
|
/* these options have been already taken care of before: */
|
|
/* these options have been already taken care of before: */
|
|
case 'l':
|
|
case 'l':
|