EASYRSA_PKI might not be defined.

This commit is contained in:
Robin Schneider 2015-03-13 00:43:50 +01:00
parent e6e2221d8b
commit fd4a5dc38e
No known key found for this signature in database
GPG Key ID: 489A4D5EC353C98A
2 changed files with 12 additions and 2 deletions

View File

@ -11,9 +11,16 @@ fi
set -e set -e
if [ -z "$OPENVPN" ]; then if [ -z "$OPENVPN" ]; then
OPENVPN="$PWD" export OPENVPN="$PWD"
fi fi
source "$OPENVPN/ovpn_env.sh" if ! source "$OPENVPN/ovpn_env.sh"; then
echo "Could not source $OPENVPN/ovpn_env.sh."
exit 1
fi
if [ -z "$EASYRSA_PKI" ]; then
export EASYRSA_PKI="$OPENVPN/pki"
fi
cn="$1" cn="$1"
parm="$2" parm="$2"

View File

@ -9,6 +9,9 @@ if ! source "$OPENVPN/ovpn_env.sh"; then
echo "Could not source $OPENVPN/ovpn_env.sh." echo "Could not source $OPENVPN/ovpn_env.sh."
exit 1 exit 1
fi fi
if [ -z "$EASYRSA_PKI" ]; then
export EASYRSA_PKI="$OPENVPN/pki"
fi
pushd "$EASYRSA_PKI" pushd "$EASYRSA_PKI"
for name in issued/*.crt; do for name in issued/*.crt; do