Page 1 of 1

Disconnect Client with script exit code

Posted: Fri Mar 17, 2017 12:41 pm
by JoeLemaire
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!

Re: Disconnect Client with script exit code

Posted: Thu Mar 23, 2017 5:06 pm
by JoeLemaire
No one has any thoughts?