#!/usr/bin/python
import os
import sys
client=sys.argv[1]
homeDir="/home/vpnUsers"
os.system("cd /etc/openvpn/easy-rsa/")
os.system("./easyrsa build-client-full %s" %(client))
os.system("cp /etc/openvpn/client-template.txt %s/%s.ovpn" %(homeDir,client))
At os.system("./easyrsa build-client-full %s" %(client)) if I run it manually on terminal it ask 2 times for a password, so If I do it manually I can enter a password, click enter and its done. How can I do this but with python?
Lets supose the sys.argv[2] its the password and it should be written at the this command when it ask for password.
Ps: the args come from php.
some_command < file_with_parameterscommand < file_with_args. It should works!