Update index.py

pull/618/head
Mr Chen 10 months ago
parent d2ade7aa90
commit dd45fb47d6
  1. 18
      plugins/zabbix/index.py

@ -177,13 +177,7 @@ def zabbixImportMySQLData():
pmdb.query("set global log_bin_trust_function_creators=0")
php_src_tpl = getPluginDir()+'/conf/zabbix.conf.php'
php_dst_path = zabbixPhpConf()
# php配置
if not os.path.exists(php_dst_path):
content = mw.readFile(php_src_tpl)
content = contentReplace(content)
mw.writeFile(php_dst_path, content)
ver = getInstallVerion()
if ver == '6.0':
@ -210,12 +204,22 @@ def initZsConf():
content = contentReplace(content)
mw.writeFile(zs_dst_path, content)
def initPhpConf():
php_src_tpl = getPluginDir()+'/conf/zabbix.conf.php'
php_dst_path = zabbixPhpConf()
# php配置
if not os.path.exists(php_dst_path):
content = mw.readFile(php_src_tpl)
content = contentReplace(content)
mw.writeFile(php_dst_path, content)
def initDreplace():
# 导入MySQL配置
zabbixImportMySQLData()
# 初始化OP配置
initOpConf()
initPhpConf()
init_file = getServerDir() + '/init.pl'
if not os.path.exists(init_file):

Loading…
Cancel
Save