12 lines
387 B
Python
12 lines
387 B
Python
import sys
|
|
import subprocess
|
|
|
|
def genVPN(cu, dev):
|
|
result = subprocess.call(['sh', 'ikev2.sh', '--addclient', cu+'-'+dev])
|
|
if result == "Error: Invalid client name. Client " + cu+'-'+dev + " already exists.":
|
|
return getVPN(cu, dev)
|
|
else:
|
|
return "profiles/"+cu+'-'+dev+".mobileconfig"
|
|
|
|
def getVPN(cu, dev):
|
|
return "profiles/"+cu+'-'+dev+".mobileconfig" |