From 4b123a2225b1fc9638f5a95eab1500e07662a36a Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Mon, 8 Jul 2019 23:19:59 +0000 Subject: [PATCH] Add revocation capability --- pyvpn | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pyvpn b/pyvpn index 0f408a2..f40bff1 100755 --- a/pyvpn +++ b/pyvpn @@ -46,6 +46,17 @@ if len(sys.argv) > 2: quit() + elif sys.argv[1] == "--revoke-client": + + prog = os.popen('which revoke-vpn-user').read() + + if prog == "/usr/bin/revoke-vpn-user": + + os.System(prog + " " + sys.argv[2]) + else: + sys.stdout.write("Error! This system is not ready for client revocation yet. Please try again later.") + sys.stdout.flush() + quit() else: sys.stdout.write("Error! Missing options!")