diff --git a/auto_install/install.sh b/auto_install/install.sh index 4f9d0b5..299f53f 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -532,7 +532,7 @@ getGitFiles() { echo ":::" echo "::: Checking for existing base files..." if is_repo "${1}"; then - update_repo "${1}" + update_repo "${1}" "${2}" else make_repo "${1}" "${2}" fi @@ -565,6 +565,7 @@ update_repo() { # Pull the latest commits echo -n "::: Updating repo in $1..." $SUDO rm -rf "${1}" + cd /etc $SUDO git clone -q --depth 1 --no-single-branch "${2}" "${1}" > /dev/null & spinner $! cd "${1}" || exit 1 if [ -z "${TESTING+x}" ]; then @@ -851,7 +852,7 @@ EOF fi # Build the server - ${SUDOE} ./easyrsa build-server-full ${SERVER_NAME} nopass + EASYRSA_CERT_EXPIRE=3650 ${SUDOE} ./easyrsa build-server-full ${SERVER_NAME} nopass if [[ ${useUpdateVars} == false ]]; then if [[ ${APPLY_TWO_POINT_FOUR} == false ]]; then diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index 0a571b4..6e6bee6 100755 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -147,7 +147,7 @@ if [[ ${NAME::1} == "." ]] || [[ ${NAME::1} == "-" ]]; then exit 1 fi -if [[ "${NAME}" =~ [^a-zA-Z0-9\.\-\@\_] ]]; then +if [[ "${NAME}" =~ [^a-zA-Z0-9\.\\-\@\_] ]]; then echo "Name can only contain alphanumeric characters and these characters (.-@_)." exit 1 fi