mirror of
https://github.com/midoks/mdserver-web
synced 2026-11-04 19:16:00 +08:00
Compare commits
4 Commits
1a356e516c
...
43727decf0
| Author | SHA1 | Date | |
|---|---|---|---|
| 43727decf0 | |||
| 599b3a7f4a | |||
| bf6c18c57a | |||
| 34838bb238 |
@@ -151,6 +151,10 @@ class nosqlMySQL():
|
||||
local_mysql_yum = "{}/mysql-community/etc/my.cnf".format(mw.getServerDir())
|
||||
if os.path.exists(local_mysql_yum):
|
||||
data.append({'name':'本地服务器[Tar]', 'val':'mysql-community'})
|
||||
|
||||
local_mysql_yum = "{}/mariadb/etc/my.cnf".format(mw.getServerDir())
|
||||
if os.path.exists(local_mysql_yum):
|
||||
data.append({'name':'本地服务器[mariadb]', 'val':'mariadb'})
|
||||
return mw.returnData(True, 'ok', data)
|
||||
|
||||
@singleton
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<p onclick="pluginLogs('manticoresearch','','query_log', 30);">查询日志</p>
|
||||
<p onclick="mcsRunStatus();">运行状态</p>
|
||||
<p onclick="mcsCommonFunc();">常用功能</p>
|
||||
<p onclick="pluginLogsContent('manticoresearch',$('.plugin_version').attr('version'),'systemctl_log');">服务运行日志</p>
|
||||
<p onclick="mcsReadme();">说明</p>
|
||||
</div>
|
||||
<div class="bt-w-con pd15">
|
||||
|
||||
@@ -273,6 +273,11 @@ def queryLog():
|
||||
tmp = re.search(rep, content)
|
||||
return tmp.groups()[0]
|
||||
|
||||
def systemctlLog():
|
||||
cmd = "journalctl -u manticore -n 15 --no-pager"
|
||||
data = mw.execShell(cmd)
|
||||
return data[0]
|
||||
|
||||
|
||||
def runStatus():
|
||||
s = status()
|
||||
@@ -491,6 +496,8 @@ if __name__ == "__main__":
|
||||
print(runLog())
|
||||
elif func == 'query_log':
|
||||
print(queryLog())
|
||||
elif func == 'systemctl_log':
|
||||
print(systemctlLog())
|
||||
elif func == 'run_status':
|
||||
print(runStatus())
|
||||
elif func == 'run_status_test':
|
||||
|
||||
@@ -25,19 +25,18 @@ Install_App()
|
||||
|
||||
wget --no-check-certificate -O $MC_DIR/manticore-repo.noarch.deb https://repo.manticoresearch.com/manticore-repo.noarch.deb
|
||||
dpkg -i $MC_DIR/manticore-repo.noarch.deb
|
||||
apt update -y
|
||||
apt update -y
|
||||
apt -y upgrade manticore
|
||||
apt -y install manticore manticore-extra
|
||||
|
||||
|
||||
echo "${VERSION}" > $serverPath/manticoresearch/version.pl
|
||||
|
||||
|
||||
cd ${rootPath} && python3 plugins/manticoresearch/index.py start ${VERSION}
|
||||
cd ${rootPath} && python3 plugins/manticoresearch/index.py initd_install ${VERSION}
|
||||
|
||||
if [ -d ${MC_DIR} ];then
|
||||
rm -rf ${MC_DIR}
|
||||
fi
|
||||
# if [ -d ${MC_DIR} ];then
|
||||
# rm -rf ${MC_DIR}
|
||||
# fi
|
||||
}
|
||||
|
||||
Uninstall_App()
|
||||
|
||||
Reference in New Issue
Block a user