Disconnect Client with script exit code

JoeLemaire
OpenVpn Newbie
Posts: 2
Joined: Fri Mar 17, 2017 12:36 pm

Disconnect Client with script exit code

Postby JoeLemaire » Fri Mar 17, 2017 12:41 pm

Hello,

I have a client-connect script that runs and checks for things on the client. Depending on what the script finds, it returns an exit code of 0 (success) or 1 (failed). It was my understanding that if you returned a 0 the client will stay connected, and if you returned a 1 (or anything else) it will disconnect the client. I'm using sys.exit(0) and sys.exit(1) to generate my exit codes.

My questions are this:
- Is my understanding correct?
- If not, what is the best way to achieve what I'm trying to do?

I'm currently running OpenVPN Access Server 2.1.2, and using Python as my scripting language.

Thanks in advance!

JoeLemaire
OpenVpn Newbie
Posts: 2
Joined: Fri Mar 17, 2017 12:36 pm

Re: Disconnect Client with script exit code

Postby JoeLemaire » Thu Mar 23, 2017 5:06 pm

No one has any thoughts?


Return to “Access Server”

Who is online

Users browsing this forum: No registered users and 1 guest