From 6bfa25fa65632e6aecade258baad43bd4cab2397 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 20 Jun 2022 16:31:01 +0800 Subject: [PATCH] https://github.com/mw-plugin/go-fastdfs-web --- plugins/go-fastdfs-web/ico.png | Bin 4550 -> 0 bytes plugins/go-fastdfs-web/index.html | 21 --- plugins/go-fastdfs-web/index.py | 196 ----------------------- plugins/go-fastdfs-web/info.json | 16 -- plugins/go-fastdfs-web/init.d/go-fastdfs-web.tpl | 91 ----------- plugins/go-fastdfs-web/install.sh | 54 ------- plugins/go-fastdfs-web/js/fastdfs.js | 47 ------ 7 files changed, 425 deletions(-) delete mode 100644 plugins/go-fastdfs-web/ico.png delete mode 100755 plugins/go-fastdfs-web/index.html delete mode 100755 plugins/go-fastdfs-web/index.py delete mode 100755 plugins/go-fastdfs-web/info.json delete mode 100644 plugins/go-fastdfs-web/init.d/go-fastdfs-web.tpl delete mode 100755 plugins/go-fastdfs-web/install.sh delete mode 100755 plugins/go-fastdfs-web/js/fastdfs.js diff --git a/plugins/go-fastdfs-web/ico.png b/plugins/go-fastdfs-web/ico.png deleted file mode 100644 index 23f776333219a4a1b8d86e463ea1ceba34fded96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4550 zcmZ`-cRW@9|3A34?9i=jvf|oYn=8tm*?VW?~4uX&`Ac*;4-UkDD z@CS*5mIeyC{CB)=f0F@0v_I~mRE*u`8!Up%j3ygxZ&BTSs=}z{6y9JHDB%luTCy^A>Ze@?6kA9 z(7tcq^raz$A*1v0AURq+c<=X@m&GVfgM}tsxSUDxh_*f-WAT({V@5^>!;3F22o|b? zSaJr5JH>Up{QTuYyu7@ke0*;|wAPT)u(qL>`qLv)uSs&8uQ&JlNw>|2~Z zP3U#lPh_|iKIzfGDi^Rx#v&I`6@#^da?1)a7zVy1PQm-{&Sa&fk2?91-c#i$|M%aX zS#Fv1Pl($&Ur-VE~XxfUXeYNjkF$rmDHFb4j?Hn=UGQEO}750FzlTb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R!1#KqiV+wO^o7I%9WcDI4CvUuX+tKAWh#&%Cs>6ndSBDT|e!ey^mw{4Q=} zM5RhRaBD`gTW+Tf^Y>S8@?0mZO)@w!F|nZ1Sit&70^VOmky++m|E#HTz)5T$RAr;9 zt4k4u>RZu}MUeL$A0H31$_KL3CiliTaHMPMzZs*;Edx1#7Z6p653b|3kDFWnKYoZh zJv}WSj&awl;!i5t-{05c=HbZ<3<=puOi8iM%g9*#vpT}1UpcX`x=Mx%-PcKLNYBfw zGHdXdNMlr|QzbJtHeS`sNAgfnP*ea4r#E8kr6N`n(H@pzFji5)%8Q89pjp#aoF(8< zW$tcnZV*#4F&2w$?5OED_0TalpRSykn4p3_*1M09L5K*v2w4orPpOEDv%VjG=VvGT zG7r92u`c@$zf#bn^)30)s@E=jBk2k$n8G63wE!HA4q4su*`#g6m46nrj)W!t+VtF9XyouprL@w9*%Wk3bx~JiGww^=Po*j(u9Jk@kt|{y{z=5z!zWU7RWh$Tcjp zGczP}^>8?xgj;z`!o|tS&f5AWy=rY$6_wwA|9x{3`}v@zJu4<523biYZ%t`1KR<5; zMIIgokdc!|rE_UeuOc`&>=#tbg%X}TiFNEtCE$Po4OZr3jJBvIiMPLlU67nHlCwBF zJFB3h1M%>McA1URBXk5A2QVPsUx$WD=n8B!tJv;@hK72+kx$oz0SL&;%ikm2fBEG# z6`eH~C#Tpu+s=2*{u@~;ycyT7Qp6cln{Iq@@q6Ix?CfV{Wz`E@M#RZ_WsL*iOWuUu zUw~O8Es95ujjMIYu+7afAaCG<6_~DG1raB=qM-rrqlT4P(6ur#SHCz#xkAz`h2J* zpja}Q+1YANPTWh&%WH1A!YjLho!(QmKZk1RYhR|nvyFJwG0o1o0ph&PExlKH7PhuZ z@K);#85tRUu$|u3)zxzg3w96D=pJAqz5qG82l9GvwDTI~) diff --git a/plugins/go-fastdfs-web/index.html b/plugins/go-fastdfs-web/index.html deleted file mode 100755 index 2045e82ab..000000000 --- a/plugins/go-fastdfs-web/index.html +++ /dev/null @@ -1,21 +0,0 @@ -
-
-
-

服务

-

自启动

-

配置

-

运行日志

-

说明

-
-
-
-
-
-
- - \ No newline at end of file diff --git a/plugins/go-fastdfs-web/index.py b/plugins/go-fastdfs-web/index.py deleted file mode 100755 index fece30bf1..000000000 --- a/plugins/go-fastdfs-web/index.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -import time -import random -import os -import json -import re -import sys -import subprocess -import threading - -sys.path.append(os.getcwd() + "/class/core") -import mw - -app_debug = False -if mw.isAppleSystem(): - app_debug = True - - -def getPluginName(): - return 'go-fastdfs-web' - - -def getPluginDir(): - return mw.getPluginDir() + '/' + getPluginName() - - -def getServerDir(): - return mw.getServerDir() + '/' + getPluginName() - - -def getInitDFile(): - if app_debug: - return '/tmp/' + getPluginName() - return '/etc/init.d/' + getPluginName() - - -def getInitDTpl(): - return getPluginDir() + "/init.d/" + getPluginName() + ".tpl" - - -def getLog(): - return getServerDir() + "/log/fileserver.log" - - -def gfBreakpointLog(): - return getServerDir() + "/log/tusd.log" - - -def getArgs(): - args = sys.argv[2:] - tmp = {} - args_len = len(args) - - if args_len == 1: - t = args[0].strip('{').strip('}') - t = t.split(':') - tmp[t[0]] = t[1] - elif args_len > 1: - for i in range(len(args)): - t = args[i].split(':') - tmp[t[0]] = t[1] - - return tmp - - -def checkArgs(data, ck=[]): - for i in range(len(ck)): - if not ck[i] in data: - return (False, mw.returnJson(False, '参数:(' + ck[i] + ')没有!')) - return (True, mw.returnJson(True, 'ok')) - - -def status(): - pn = getPluginName() - data = mw.execShell( - "ps -ef|grep " + pn + " | grep -v grep | grep -v python | awk '{print $2}'") - if data[0] == '': - return 'stop' - return 'start' - - -def initDreplace(): - - file_tpl = getInitDTpl() - service_path = os.path.dirname(os.getcwd()) - - initD_path = getServerDir() + '/init.d' - if not os.path.exists(initD_path): - os.mkdir(initD_path) - - file_bin = initD_path + '/' + getPluginName() - if not os.path.exists(file_bin): - content = mw.readFile(file_tpl) - content = content.replace('{$SERVER_PATH}', service_path) - mw.writeFile(file_bin, content) - mw.execShell('chmod +x ' + file_bin) - - return file_bin - - -def start(): - file = initDreplace() - data = mw.execShell(file + ' start') - if data[1] == '': - return 'ok' - return 'fail' - - -def stop(): - file = initDreplace() - data = mw.execShell(file + ' stop') - if data[1] == '': - return 'ok' - return 'fail' - - -def restart(): - file = initDreplace() - data = mw.execShell(file + ' restart') - if data[1] == '': - return 'ok' - return 'fail' - - -def reload(): - file = initDreplace() - data = mw.execShell(file + ' reload') - if data[1] == '': - return 'ok' - return 'fail' - - -def initdStatus(): - initd_bin = getInitDFile() - if os.path.exists(initd_bin): - return 'ok' - return 'fail' - - -def initdInstall(): - import shutil - - source_bin = initDreplace() - initd_bin = getInitDFile() - shutil.copyfile(source_bin, initd_bin) - mw.execShell('chmod +x ' + initd_bin) - - if not app_debug: - mw.execShell('chkconfig --add ' + getPluginName()) - return 'ok' - - -def initdUinstall(): - if not app_debug: - mw.execShell('chkconfig --del ' + getPluginName()) - - initd_bin = getInitDFile() - - if os.path.exists(initd_bin): - os.remove(initd_bin) - return 'ok' - - -def gfConf(): - return getServerDir() + "/config/application-prod.properties" - - -def getLog(): - return getServerDir() + "/logs/go-fastdfs-web.log" - - -if __name__ == "__main__": - func = sys.argv[1] - if func == 'status': - print(status()) - elif func == 'start': - print(start()) - elif func == 'stop': - print(stop()) - elif func == 'restart': - print(restart()) - elif func == 'reload': - print(reload()) - elif func == 'initd_status': - print(initdStatus()) - elif func == 'initd_install': - print(initdInstall()) - elif func == 'initd_uninstall': - print(initdUinstall()) - elif func == 'run_log': - print(getLog()) - elif func == 'conf': - print(gfConf()) - else: - print('error') diff --git a/plugins/go-fastdfs-web/info.json b/plugins/go-fastdfs-web/info.json deleted file mode 100755 index 9ef138a78..000000000 --- a/plugins/go-fastdfs-web/info.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "id":10, - "title":"go-fastdfs-web", - "tip":"soft", - "name":"go-fastdfs-web", - "type":"软件", - "ps":"Go-Fastdfs web管理平台", - "versions":"1.1.2", - "shell":"install.sh", - "checks":"server/go-fastdfs-web", - "path": "server/go-fastdfs-web", - "author":"midoks", - "home":"https://github.com/perfree/go-fastdfs-web", - "date":"2019-08-07", - "pid":"5" -} \ No newline at end of file diff --git a/plugins/go-fastdfs-web/init.d/go-fastdfs-web.tpl b/plugins/go-fastdfs-web/init.d/go-fastdfs-web.tpl deleted file mode 100644 index 6ab4c5803..000000000 --- a/plugins/go-fastdfs-web/init.d/go-fastdfs-web.tpl +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# chkconfig: 2345 55 25 -# description: go-fastdfs-web Cloud Service - -### BEGIN INIT INFO -# Provides: bt -# Required-Start: $all -# Required-Stop: $all -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: starts go-fastdfs-web -# Description: starts the go-fastdfs-web -### END INIT INFO - - -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin - -SpringBoot=go-fastdfs-web.jar -gf_path={$SERVER_PATH}/go-fastdfs-web/$SpringBoot - -if [ "$1" = "" ]; -then - echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m" - exit 1 -fi - -if [ "$SpringBoot" = "" ]; -then - echo -e "\033[0;31m 未输入应用名 \033[0m" - exit 1 -fi - -function start() -{ - count=`ps -ef |grep java|grep $SpringBoot|grep -v grep|wc -l` - if [ $count != 0 ];then - echo "$SpringBoot is running..." - else - echo "Start $SpringBoot success..." - cd $gf_path - nohup java -jar $SpringBoot > /dev/null 2>&1 & - fi -} - -function stop() -{ - echo "Stop $SpringBoot" - boot_id=`ps -ef |grep java|grep $SpringBoot|grep -v grep|awk '{print $2}'` - count=`ps -ef |grep java|grep $SpringBoot|grep -v grep|wc -l` - - if [ $count != 0 ];then - kill $boot_id - count=`ps -ef |grep java|grep $SpringBoot|grep -v grep|wc -l` - - boot_id=`ps -ef |grep java|grep $SpringBoot|grep -v grep|awk '{print $2}'` - kill -9 $boot_id - fi -} - -function restart() -{ - stop - sleep 2 - start -} - -function status() -{ - count=`ps -ef |grep java|grep $SpringBoot|grep -v grep|wc -l` - if [ $count != 0 ];then - echo "$SpringBoot is running..." - else - echo "$SpringBoot is not running..." - fi -} - -case $1 in - start) - start;; - stop) - stop;; - restart) - restart;; - status) - status;; - *) - - echo -e "\033[0;31m Usage: \033[0m \033[0;34m sh $0 {start|stop|restart|status} {SpringBootJarName} \033[0m -\033[0;31m Example: \033[0m - \033[0;33m sh $0 start esmart-test.jar \033[0m" -esac diff --git a/plugins/go-fastdfs-web/install.sh b/plugins/go-fastdfs-web/install.sh deleted file mode 100755 index 04a967566..000000000 --- a/plugins/go-fastdfs-web/install.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/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") -sysName=`uname` - -install_tmp=${rootPath}/tmp/mw_install.pl - -action=$1 -version=$2 -Install_gf() -{ - echo '正在安装脚本文件...' > $install_tmp - mkdir -p $serverPath/go-fastdfs-web - FF_DIR=${serverPath}/go-fastdfs-web - cd $FF_DIR - - if [ $sysName == 'Darwin' ]; then - FF_SS_DIR=${serverPath}/source/go-fastdfs-web - mkdir -p $FF_SS_DIR - if [ ! -f $FF_SS_DIR/go-fastdfs-web-1.1.2.tar.gz ]; then - wget -O $FF_SS_DIR/go-fastdfs-web-1.1.2.tar.gz https://github.com/perfree/go-fastdfs-web/releases/download/1.1.2/go-fastdfs-web-1.1.2.tar.gz - fi - - cd $FF_SS_DIR - if [ ! -d $FF_SS_DIR/go-fastdfs-web ]; then - tar -zxvf $FF_SS_DIR/go-fastdfs-web-1.1.2.tar.gz - fi - - if [ ! -d $FF_DIR/config ];then - cp -rf $FF_SS_DIR/go-fastdfs-web/* $FF_DIR/ - fi - fi - - echo "$version" > $FF_DIR/version.pl - echo '安装完成' > $install_tmp -} - -Uninstall_gf() -{ - rm -rf $serverPath/go-fastdfs-web - echo "卸载完成" > $install_tmp -} - - -if [ "${1}" == 'install' ];then - Install_gf $version -else - Uninstall_gf $version -fi diff --git a/plugins/go-fastdfs-web/js/fastdfs.js b/plugins/go-fastdfs-web/js/fastdfs.js deleted file mode 100755 index 63c8ef8a3..000000000 --- a/plugins/go-fastdfs-web/js/fastdfs.js +++ /dev/null @@ -1,47 +0,0 @@ -function str2Obj(str){ - var data = {}; - kv = str.split('&'); - for(i in kv){ - v = kv[i].split('='); - data[v[0]] = v[1]; - } - return data; -} - -function pPost(method,args,callback, title){ - - var _args = null; - if (typeof(args) == 'string'){ - _args = JSON.stringify(str2Obj(args)); - } else { - _args = JSON.stringify(args); - } - - var _title = '正在获取...'; - if (typeof(title) != 'undefined'){ - _title = title; - } - - var loadT = layer.msg(_title, { icon: 16, time: 0, shade: 0.3 }); - $.post('/plugins/run', {name:'go-fastdfs-web', func:method, args:_args}, function(data) { - layer.close(loadT); - if (!data.status){ - layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']}); - return; - } - - if(typeof(callback) == 'function'){ - callback(data); - } - },'json'); -} - - - -function pRead(){ - var readme = '
    '; - readme += '
  • 根据配置查看,开启相应防火墙端口
  • '; - readme += '
'; - - $('.soft-man-con').html(readme); -} \ No newline at end of file