mirror of https://github.com/yuxian158/check.git
张洛
3 years ago
2 changed files with 26 additions and 13 deletions
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
import os |
||||
|
||||
|
||||
def getENv(): |
||||
ql_new = '/ql/config/env.sh' |
||||
config_file = '/ql/config/check.json' |
||||
print('尝试检查环境\n') |
||||
if os.path.exists(ql_new): |
||||
print('成功 当前环境为青龙面板继续执行') |
||||
if os.path.exists(config_file): |
||||
print('已找到配置文件') |
||||
with open(config_file, 'r', encoding='utf8') as f: |
||||
return f |
||||
else: |
||||
print('未找到配置文件\n') |
||||
print('请添加/ql/config/check.json') |
||||
else: |
||||
print('失败 请检查环境') |
||||
exit(0) |
Loading…
Reference in new issue