mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Miscellaeous fixes
This commit is contained in:
parent
52bf326d8a
commit
241e06f970
2 changed files with 4 additions and 3 deletions
|
@ -532,7 +532,7 @@ getGitFiles() {
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Checking for existing base files..."
|
echo "::: Checking for existing base files..."
|
||||||
if is_repo "${1}"; then
|
if is_repo "${1}"; then
|
||||||
update_repo "${1}"
|
update_repo "${1}" "${2}"
|
||||||
else
|
else
|
||||||
make_repo "${1}" "${2}"
|
make_repo "${1}" "${2}"
|
||||||
fi
|
fi
|
||||||
|
@ -565,6 +565,7 @@ update_repo() {
|
||||||
# Pull the latest commits
|
# Pull the latest commits
|
||||||
echo -n "::: Updating repo in $1..."
|
echo -n "::: Updating repo in $1..."
|
||||||
$SUDO rm -rf "${1}"
|
$SUDO rm -rf "${1}"
|
||||||
|
cd /etc
|
||||||
$SUDO git clone -q --depth 1 --no-single-branch "${2}" "${1}" > /dev/null & spinner $!
|
$SUDO git clone -q --depth 1 --no-single-branch "${2}" "${1}" > /dev/null & spinner $!
|
||||||
cd "${1}" || exit 1
|
cd "${1}" || exit 1
|
||||||
if [ -z "${TESTING+x}" ]; then
|
if [ -z "${TESTING+x}" ]; then
|
||||||
|
@ -851,7 +852,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build the server
|
# 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 [[ ${useUpdateVars} == false ]]; then
|
||||||
if [[ ${APPLY_TWO_POINT_FOUR} == false ]]; then
|
if [[ ${APPLY_TWO_POINT_FOUR} == false ]]; then
|
||||||
|
|
|
@ -147,7 +147,7 @@ if [[ ${NAME::1} == "." ]] || [[ ${NAME::1} == "-" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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 (.-@_)."
|
echo "Name can only contain alphanumeric characters and these characters (.-@_)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue