Fixes during testing

This commit is contained in:
Kaladin Light 2016-04-20 17:33:54 -04:00
parent ebdb9f9b1f
commit 57a8967b62

View file

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# PiVPN: Trivial openvpn setup and configuration # PiVPN: Trivial openvpn setup and configuration
# Easiest setup and mangement of openvpn on Raspberry Pi # Easiest setup and mangement of openvpn on Raspberry Pi
# http://pivpn.io
# Heavily adapted from the pi-hole.net project and...
# https://github.com/StarshipEngineer/OpenVPN-Setup/ # https://github.com/StarshipEngineer/OpenVPN-Setup/
# Installs pivpn
# Heavily adapted from the pi-hole project
# #
# Install with this command (from your Pi): # Install with this command (from your Pi):
# #
@ -405,7 +405,7 @@ confOpenVPN () {
cd /etc/openvpn/easy-rsa cd /etc/openvpn/easy-rsa
sed -i 's:"`pwd`":"/etc/openvpn/easy-rsa":' vars sed -i 's:"`pwd`":"/etc/openvpn/easy-rsa":' vars
if [[ $ENCRYPT -eq "1024" ]]; then if [[ $ENCRYPT -eq "1024" ]]; then
sed -i "s/\(KEY_SIZE=\"\).*/\1${ENCRYPT}\"/" vars sed -i "s/\(KEY_SIZE=\).*/\1${ENCRYPT}/" vars
fi fi
whiptail --title "Certificate Information" --msgbox "You will now be shown the default values for fields that will be used in the certificate. \nIt is fine to leave these as-is since only you and the clients you create will ever see this. \nHowever, if you want to change the values, simply select the ones you wish to modify." $r $c whiptail --title "Certificate Information" --msgbox "You will now be shown the default values for fields that will be used in the certificate. \nIt is fine to leave these as-is since only you and the clients you create will ever see this. \nHowever, if you want to change the values, simply select the ones you wish to modify." $r $c
@ -466,7 +466,9 @@ confOpenVPN () {
done done
# Make PiVPN the OU # Make PiVPN the OU
KEY_OU=PiVPN KEY_OU=PiVPN
KEY_ALT=PiVPN_KEYALT
sed -i "s/\(KEY_OU=\"\).*/\1${KEY_OU}\"/" vars sed -i "s/\(KEY_OU=\"\).*/\1${KEY_OU}\"/" vars
sed -i "s/\(KEY_ALTNAMES=\"\).*/\1${KEY_ALT}\"/" vars
# source the vars file just edited # source the vars file just edited
source ./vars source ./vars