non-interactive vpn install
This commit is contained in:
parent
76f8d4e47c
commit
fdaad4e96f
|
@ -163,19 +163,8 @@ function create_user_vpn_key {
|
|||
rm /etc/openvpn/easy-rsa/keys/$username.csr
|
||||
fi
|
||||
|
||||
echo '
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
y
|
||||
y
|
||||
' | ./build-key "$username"
|
||||
sed -i 's| --interact||g' build-key
|
||||
./build-key "$username"
|
||||
|
||||
if [ ! -f /etc/openvpn/easy-rsa/keys/$username.crt ]; then
|
||||
echo $'VPN user cert not generated'
|
||||
|
@ -303,29 +292,10 @@ function install_vpn {
|
|||
if [ -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.csr ]; then
|
||||
rm /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.csr
|
||||
fi
|
||||
|
||||
echo '
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' | ./build-ca
|
||||
echo '
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
y
|
||||
y
|
||||
' | ./build-key-server $OPENVPN_SERVER_NAME
|
||||
sed -i 's| --interact||g' build-key-server
|
||||
sed -i 's| --interact||g' build-ca
|
||||
./build-ca
|
||||
./build-key-server $OPENVPN_SERVER_NAME
|
||||
if [ ! -f /etc/openvpn/easy-rsa/keys/${OPENVPN_SERVER_NAME}.crt ]; then
|
||||
echo $'OpenVPN crt not found'
|
||||
exit 7823352
|
||||
|
|
Loading…
Reference in New Issue