export ID env variable

This commit is contained in:
Nikos Mavrogiannopoulos
2014-01-13 18:32:54 +01:00
parent 2e068ad0b9
commit 81c20b9237
2 changed files with 5 additions and 2 deletions

View File

@@ -66,6 +66,9 @@ const char* script;
char local[64];
char remote[64];
snprintf(real, sizeof(real), "%u", (unsigned)proc->pid);
setenv("ID", real, 1);
if (proc->ipv4 == NULL && proc->ipv6 == NULL) {
mslog(s, proc, LOG_DEBUG, "no IP configured; script failed");
exit(1);

View File

@@ -201,8 +201,8 @@ cookie-validity = 172800
# Parameters are passed on the environment.
# REASON, USERNAME, GROUPNAME, HOSTNAME (the hostname selected by client),
# DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
# in the P-t-P connection), IP_REMOTE (the VPN IP of the client). REASON
# may be "connect" or "disconnect".
# in the P-t-P connection), IP_REMOTE (the VPN IP of the client),
# ID (a unique numeric ID); REASON may be "connect" or "disconnect".
#connect-script = /usr/bin/myscript
#disconnect-script = /usr/bin/myscript