瀏覽代碼

Allow a pre-existing /config/openvpn-credentials.txt file.

Instead of bailing when the OpenVPN user and password aren't defined in the environment, first check and see if we already have a /config/openvpn-credentials.txt file from a persistent volume.
master
Ken Sanislo 6 年之前
父節點
當前提交
0af676b481
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. 5
    2
      openvpn/start.sh

+ 5
- 2
openvpn/start.sh 查看文件

@@ -27,8 +27,11 @@ fi

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

Loading…
取消
儲存