This commit is contained in:
Mr Chen
2018-11-05 17:19:02 +08:00
parent 2f8d37d556
commit 70d1e0dcb2
2 changed files with 6 additions and 14 deletions
+5 -13
View File
@@ -8,22 +8,15 @@ rootPath=$(dirname "$rootPath")
install_tmp=${rootPath}'/tmp/bt_install.pl'
echo $curPath
download_Url=http://$nodeAddr:5880
Install_score()
{
echo '正在安装脚本文件...' > $install_tmp
# gcc /www/server/mdserver-web/plugin/score/testcpu.c -o /www/server/mdserver-web/plugin/score/testcpu -lpthread
# if [ ! -f '/www/server/mdserver-web/plugin/score/testcpu' ];then
# sleep 0.1
# gcc /www/server/mdserver-web/plugin/score/testcpu.c -o /www/server/mdserver-web/plugin/score/testcpu -lpthread
# fi
gcc $curPath/testcpu.c -o $curPath/testcpu -lpthread
if [ ! -f $curPath/testcpu ];then
sleep 0.1
gcc $curPath/testcpu.c -o $curPath/testcpu -lpthread
fi
echo '安装完成' > $install_tmp
}
@@ -35,7 +28,6 @@ Uninstall_score()
action=$1
echo $action
if [ "${1}" == 'install' ];then
Install_score
else
+1 -1
View File
@@ -98,7 +98,7 @@ def install():
pluginInfo = json.loads(public.readFile(infoJsonPos))
execstr = "cd " + os.getcwd() + "/plugins/" + \
name + " && /bin/bash " + pluginInfo["shell"] + " install" + version
name + " && /bin/bash " + pluginInfo["shell"] + " install " + version
taskAdd = (None, mmsg + '[' + name + '-' + version + ']',
'execshell', '0', time.strftime('%Y-%m-%d %H:%M:%S'), execstr)