Merge pull request #377 from ksanislo/dev

Allow a pre-existing /config/openvpn-credentials.txt file.
This commit is contained in:
Kristian Haugene 2018-01-12 10:04:16 +01:00 committed by GitHub
commit 165c187525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,8 +27,11 @@ fi
# add OpenVPN user/pass # add OpenVPN user/pass
if [ "${OPENVPN_USERNAME}" = "**None**" ] || [ "${OPENVPN_PASSWORD}" = "**None**" ] ; then if [ "${OPENVPN_USERNAME}" = "**None**" ] || [ "${OPENVPN_PASSWORD}" = "**None**" ] ; then
echo "OpenVPN credentials not set. Exiting." if [ ! -f /config/openvpn-credentials.txt ] ; then
exit 1 echo "OpenVPN credentials not set. Exiting."
exit 1
fi
echo "Found existing OPENVPN credentials..."
else else
echo "Setting OPENVPN credentials..." echo "Setting OPENVPN credentials..."
mkdir -p /config mkdir -p /config