mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update index.py
This commit is contained in:
+13
-14
@@ -836,23 +836,22 @@ def opcacheBlacklistFile():
|
||||
return op_bl
|
||||
|
||||
def installPreInspection(version):
|
||||
try:
|
||||
cmd = "cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'"
|
||||
sys = mw.execShell(cmd)
|
||||
if sys[1] != '':
|
||||
return '不支持该系统'
|
||||
|
||||
cmd = "cat /etc/*-release | grep PRETTY_NAME |awk -F = '{print $2}' | awk -F '\"' '{print $2}'| awk '{print $1}'"
|
||||
sys = mw.execShell(cmd)
|
||||
if sys[1] != '':
|
||||
return '不支持该系统'
|
||||
|
||||
cmd = "cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'"
|
||||
sys_id = mw.execShell(cmd)
|
||||
cmd = "cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F '\"' '{print $2}'"
|
||||
sys_id = mw.execShell(cmd)
|
||||
|
||||
sysName = sys[0].strip().lower()
|
||||
sysId = sys_id[0].strip()
|
||||
sysName = sys[0].strip().lower()
|
||||
sysId = sys_id[0].strip()
|
||||
|
||||
if not sysName in ['centos','almalinux']:
|
||||
return '暂时仅支持centos,almalinux'
|
||||
return 'ok'
|
||||
|
||||
if not sysName in ['centos','almalinux']:
|
||||
return '暂时仅支持centos,almalinux'
|
||||
return 'ok'
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user