Skip to content
Snippets Groups Projects
Commit fdaad4e9 authored by Bob Mottram's avatar Bob Mottram
Browse files

non-interactive vpn install

parent 76f8d4e4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment