diff --git a/plugins/memcached/install.sh b/plugins/memcached/install.sh index 355155d96..8b277e668 100755 --- a/plugins/memcached/install.sh +++ b/plugins/memcached/install.sh @@ -17,21 +17,20 @@ Install_mem() echo '正在安装脚本文件...' > $install_tmp - wget -O $serverPath/tmp/redis.tar.gz http://download.redis.io/releases/redis-4.0.11.tar.gz - cd $serverPath/tmp && tar -zxvf redis.tar.gz + wget -O $serverPath/tmp/memcached.tar.gz http://www.memcached.org/files/memcached-1.5.12.tar.gz + cd $serverPath/tmp && tar -zxvf memcached.tar.gz - mkdir -p $serverPath/redis - cd redis* && make PREFIX=$serverPath/redis install - sed '/^ *#/d' redis.conf > $serverPath/redis/redis.conf + mkdir -p $serverPath/memcached + cd memcached* && ./configure --prefix=$serverPath/memcached && make && make install echo '安装完成' > $install_tmp - rm -rf $serverPath/tmp + #rm -rf $serverPath/tmp } Uninstall_mem() { - echo "Uninstall_mem" + rm -rf mkdir -p $serverPath/memcached } diff --git a/plugins/nginx/info.json b/plugins/nginx/info.json deleted file mode 100755 index 5cf3cc061..000000000 --- a/plugins/nginx/info.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "title":"Nginx", - "tip":"soft", - "name":"nginx", - "type":"其他插件", - "ps":"轻量级,占有内存少,并发能力强", - "shell":"install.sh", - "checks":"server/nginx", - "author":"伊戈尔·赛索耶夫", - "home":"https://www.nginx.org", - "checks": "server/nginx", - "date":"2017-11-24", - "pid": "1", - "versions": ["1.14.0", "1.12.2", "1.8.1", "1.15.3", "-Tengine2.2.2", "openresty"], - "updates": ["1.14.0", "1.12.2", "1.8.1", "1.15.3", "-Tengine2.2.2", "openresty"] -} \ No newline at end of file diff --git a/plugins/nginx/install.sh b/plugins/nginx/install.sh deleted file mode 100755 index 6ba43256c..000000000 --- a/plugins/nginx/install.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -Install_nginx() -{ - echo "Install_safelogin" -} - -Uninstall_nginx() -{ - echo "Uninstall_safelogin" -} - -action=$1 -host=$2; -if [ "${1}" == 'install' ];then - Install_nginx -else - Uninstall_nginx -fi diff --git a/plugins/nginx/ico.png b/plugins/openresty/ico.png similarity index 100% rename from plugins/nginx/ico.png rename to plugins/openresty/ico.png diff --git a/plugins/nginx/index.html b/plugins/openresty/index.html similarity index 100% rename from plugins/nginx/index.html rename to plugins/openresty/index.html diff --git a/plugins/openresty/info.json b/plugins/openresty/info.json new file mode 100755 index 000000000..29e7de511 --- /dev/null +++ b/plugins/openresty/info.json @@ -0,0 +1,15 @@ +{ + "title":"openresty", + "tip":"soft", + "name":"openresty", + "type":"其他插件", + "ps":"轻量级,占有内存少,并发能力强", + "shell":"install.sh", + "checks":"server/openresty", + "author":"agentzh", + "home":"http://openresty.org", + "date":"2017-11-24", + "pid": "1", + "versions": ["1.13.6"], + "updates": ["1.13.6.2"] +} \ No newline at end of file diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh new file mode 100755 index 000000000..1c61e5994 --- /dev/null +++ b/plugins/openresty/install.sh @@ -0,0 +1,39 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + +install_tmp=${rootPath}/tmp/bt_install.pl + + +Install_openresty() +{ + mkdir -p $serverPath/tmp + echo '正在安装脚本文件...' > $install_tmp + + wget -O $serverPath/tmp/openresty.tar.gz https://openresty.org/download/openresty-1.13.6.2.tar.gz + cd $serverPath/tmp && tar -zxvf openresty.tar.gz + + mkdir -p $serverPath/openresty + cd openresty* && ./configure --prefix=$serverPath/openresty && make && make install + + echo '安装完成' > $install_tmp + #rm -rf $serverPath/tmp +} + +Uninstall_openresty() +{ + echo "Uninstall_safelogin" +} + +action=$1 +host=$2 +if [ "${1}" == 'install' ];then + Install_openresty +else + Uninstall_openresty +fi diff --git a/task.py b/task.py index edd4e7c18..a116af1ec 100755 --- a/task.py +++ b/task.py @@ -119,7 +119,7 @@ def startTask(): "status=?", ('-1',)).setField('status', '0') taskArr = sql.table('tasks').where("status=?", ('0',)).field( 'id,type,execstr').order("id asc").select() - # print sql + print sql for value in taskArr: start = int(time.time()) if not sql.table('tasks').where("id=?", (value['id'],)).count():