Browse Source

Preferred /ql/data/config/ to detect if on new Qinglong

pull/20/head
cddjr 2 years ago
parent
commit
116b76e5fc
No known key found for this signature in database
GPG Key ID: D1E625DFCF77A9F
  1. 8
      utils.py

8
utils.py

@ -67,12 +67,12 @@ class config_get(object):
def get_config_path(): def get_config_path():
ql_old = "/ql/config/" ql_old = "/ql/config/"
ql_new = "/ql/data/config/" ql_new = "/ql/data/config/"
if os.path.isdir(ql_old): if os.path.isdir(ql_new):
print('成功 当前环境为青龙面板v2.12- 继续执行\n')
return ql_old
elif os.path.isdir(ql_new):
print('成功 当前环境为青龙面板v2.12+ 继续执行\n') print('成功 当前环境为青龙面板v2.12+ 继续执行\n')
return ql_new return ql_new
elif os.path.isdir(ql_old):
print('成功 当前环境为青龙面板v2.12- 继续执行\n')
return ql_old
else: else:
print('失败 请检查环境') print('失败 请检查环境')
exit(0) exit(0)

Loading…
Cancel
Save