Add revocation capability

This commit is contained in:
Miguel Nogueira 2019-07-08 23:19:59 +00:00
parent 5077813018
commit 4b123a2225
1 changed files with 11 additions and 0 deletions

11
pyvpn
View File

@ -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!")