浏览代码

some error checking added

crocandr 6 年之前
父节点
当前提交
ad4325d5e2
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      files/start.sh

+ 3 - 0
files/start.sh

@@ -2,6 +2,9 @@
 
 BASE_DIR="/opt/vpnserver"
 
+# config file check
+[ -f $BASE_DIR/vpn_server.config ] || { echo "Config is not a file! Check your docker settings."; exit 1; }
+
 # first start 
 if [ -s $BASE_DIR/vpn_server.config ]
 then