Disconnect Client with script exit code
Posted: 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!
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!