diff --git a/plugins/lam/conf/config.cfg b/plugins/lam/conf/config.cfg new file mode 100644 index 000000000..046734c5e --- /dev/null +++ b/plugins/lam/conf/config.cfg @@ -0,0 +1,39 @@ +{ + "password": "{CRYPT-SHA512}$6$WheNHdlVwDoL4s.x$DrZ10TpIGQa5wd0jbvtm8eaTleJCf1nec3ihOaNwMdPUKVFCphXwtnTSmFFXjhGa45RlrSEWhDVyjLCMiV\/.c. V2hlTkhkbFZ3RG9MNHMueA==", + "default": "lam", + "sessionTimeout": "30", + "hideLoginErrorDetails": "false", + "logLevel": "4", + "logDestination": "SYSLOG", + "allowedHosts": "", + "passwordMinLength": "10", + "passwordMinUpper": "0", + "passwordMinLower": "0", + "passwordMinNumeric": "0", + "passwordMinClasses": "0", + "passwordMinSymbol": "0", + "checkedRulesCount": "-1", + "passwordMustNotContainUser": "false", + "passwordMustNotContain3Chars": "false", + "externalPwdCheckUrl": "", + "errorReporting": "default", + "allowedHostsSelfService": "", + "license": "", + "licenseEmailFrom": "", + "licenseEmailTo": "", + "licenseWarningType": "all", + "licenseEmailDateSent": "", + "mailServer": "", + "mailUser": "", + "mailPassword": "", + "mailEncryption": "TLS", + "mailAttribute": "mail", + "mailBackupAttribute": "passwordselfresetbackupmail", + "configDatabaseType": "files", + "configDatabaseServer": "", + "configDatabasePort": "", + "configDatabaseName": "", + "configDatabaseUser": "", + "configDatabasePassword": "", + "moduleSettings": "eyJyZXF1ZXN0QWNjZXNzIjp7Imhpc3RvcnlSZXRlbnRpb25QZXJpb2QiOiIzNjUwIiwiZXhwaXJhdGlvblBlcmlvZCI6IjMwIn19" +} diff --git a/plugins/lam/conf/config.php b/plugins/lam/conf/config.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/plugins/lam/index.py b/plugins/lam/index.py index b938d1de8..dded95674 100755 --- a/plugins/lam/index.py +++ b/plugins/lam/index.py @@ -62,7 +62,7 @@ def getConf(): def getConfInc(): - return getServerDir() + "/" + getCfg()['path'] + '/config/config.php' + return getServerDir() + "/" + getCfg()['path'] + '/config/config.cfg' def getPort(): @@ -172,7 +172,7 @@ def returnCfg(): def status(): conf = getConf() - conf_inc = getServerDir() + "/" + getCfg()["path"] + '/config/config.php' + conf_inc = getServerDir() + "/" + getCfg()["path"] + '/config/config.cfg' # 两个文件都在,才算启动成功 if os.path.exists(conf) and os.path.exists(conf_inc): return 'start' @@ -251,9 +251,9 @@ def start(): os.mkdir(tmp) mw.execShell("chown -R www:www " + tmp) - conf_run = getServerDir() + "/" + getCfg()["path"] + '/config/config.php' + conf_run = getServerDir() + "/" + getCfg()["path"] + '/config/config.cfg' if not os.path.exists(conf_run): - conf_tpl = getPluginDir() + '/conf/config.php' + conf_tpl = getPluginDir() + '/conf/config.cfg' centent = mw.readFile(conf_tpl) centent = contentReplace(centent) mw.writeFile(conf_run, centent) @@ -425,35 +425,6 @@ def errorLog(): def installVersion(): return mw.readFile(getServerDir() + '/version.pl') -def pluginsDbSupport(): - data = {} - - data['installed'] = 'no' - install_path = getServerDir() - if not os.path.exists(install_path): - return mw.returnJson(True, 'ok', data) - - data['installed'] = 'ok' - data['status'] = status() - if (data['status'] == 'stop'): - return mw.returnJson(True, 'ok', data) - - data['cfg'] = getCfg() - port = getPort() - ip = '127.0.0.1' - if not mw.isAppleSystem(): - ip = thisdb.getOption('server_ip') - - cfg = data['cfg'] - auth = cfg['username']+':'+cfg['password'] - rand_path = cfg['path'] - home_page = 'http://' + auth + '@' + ip + ':' + port + '/' + rand_path + '/index.php' - - data['home_page'] = home_page - data['version'] = installVersion().strip() - - return mw.returnJson(True, 'ok', data) - if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -496,7 +467,5 @@ if __name__ == "__main__": print(accessLog()) elif func == 'error_log': print(errorLog()) - elif func == 'plugins_db_support': - print(pluginsDbSupport()) else: print('error') diff --git a/plugins/phpldapadmin/index.py b/plugins/phpldapadmin/index.py index 3217d8bf3..4bf615859 100755 --- a/plugins/phpldapadmin/index.py +++ b/plugins/phpldapadmin/index.py @@ -422,35 +422,6 @@ def errorLog(): def installVersion(): return mw.readFile(getServerDir() + '/version.pl') -def pluginsDbSupport(): - data = {} - - data['installed'] = 'no' - install_path = getServerDir() - if not os.path.exists(install_path): - return mw.returnJson(True, 'ok', data) - - data['installed'] = 'ok' - data['status'] = status() - if (data['status'] == 'stop'): - return mw.returnJson(True, 'ok', data) - - data['cfg'] = getCfg() - port = getPort() - ip = '127.0.0.1' - if not mw.isAppleSystem(): - ip = thisdb.getOption('server_ip') - - cfg = data['cfg'] - auth = cfg['username']+':'+cfg['password'] - rand_path = cfg['path'] - home_page = 'http://' + auth + '@' + ip + ':' + port + '/' + rand_path + '/index.php' - - data['home_page'] = home_page - data['version'] = installVersion().strip() - - return mw.returnJson(True, 'ok', data) - if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -493,7 +464,5 @@ if __name__ == "__main__": print(accessLog()) elif func == 'error_log': print(errorLog()) - elif func == 'plugins_db_support': - print(pluginsDbSupport()) else: print('error')