diff --git a/README.md b/README.md
index 0af3bec42..8f0476f09 100644
--- a/README.md
+++ b/README.md
@@ -52,18 +52,51 @@ systemd 支持 CentOS,Ubuntu,Debian,Fedora...
- Ftp debian无法安装成功。
- php52,在debian无法安装成功。
-### 自动安装
+
+### GW使用
+
+- 自动安装
```
curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install.sh | bash
```
-### 脚本更新
+- 脚本更新
```
curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/update.sh | bash
```
+### GN使用
+
+- 自动安装
+
+```
+curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/install_cn.sh | bash
+```
+
+- 脚本更新
+
+```
+curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/update_cn.sh | bash
+```
+
+
+### DEV使用
+
+- 自动安装
+
+```
+curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/install_dev.sh | bash
+```
+
+- 脚本更新
+
+```
+curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh | bash
+```
+
+
### 无图不真相
[](/route/static/mdw.jpg)
@@ -82,7 +115,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts
-## Stargazers over time
+### Stargazers over time
[](https://starchart.cc/midoks/mdserver-web)
@@ -93,7 +126,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts
[digitalvirt](https://digitalvirt.com/)
-## 授权许可
+### 授权许可
本项目采用 Apache 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/midoks/mdserver-web/blob/master/LICENSE) 文件中。
diff --git a/plugins/clean/info.json b/plugins/clean/info.json
index aa65a65fb..d88831914 100755
--- a/plugins/clean/info.json
+++ b/plugins/clean/info.json
@@ -12,5 +12,5 @@
"author":"clean",
"home":"https://github.com/midoks",
"date":"2021-11-23",
- "pid": "4"
+ "pid": "5"
}
\ No newline at end of file
diff --git a/plugins/php/init.d/php.service.bak.tpl b/plugins/php/init.d/php.service.bak.tpl
new file mode 100644
index 000000000..9a02235e2
--- /dev/null
+++ b/plugins/php/init.d/php.service.bak.tpl
@@ -0,0 +1,17 @@
+# It's not recommended to modify this file in-place, because it
+# will be overwritten during upgrades. If you want to customize,
+# the best way is to use the "systemctl edit" command.
+
+[Unit]
+Description=The PHP {$VERSION} FastCGI Process Manager
+After=network.target
+
+[Service]
+Type=forking
+ExecStart={$SERVER_PATH}/php/{$VERSION}/sbin/php-fpm --daemonize --fpm-config {$SERVER_PATH}/php/{$VERSION}/etc/php-fpm.conf
+ExecStop=/bin/kill -INT $MAINPID
+ExecReload=/bin/kill -USR2 $MAINPID
+PrivateTmp=false
+
+[Install]
+WantedBy=multi-user.target
diff --git a/plugins/php/init.d/php.service.tpl b/plugins/php/init.d/php.service.tpl
index 9a02235e2..0d5beb87d 100644
--- a/plugins/php/init.d/php.service.tpl
+++ b/plugins/php/init.d/php.service.tpl
@@ -8,9 +8,9 @@ After=network.target
[Service]
Type=forking
-ExecStart={$SERVER_PATH}/php/{$VERSION}/sbin/php-fpm --daemonize --fpm-config {$SERVER_PATH}/php/{$VERSION}/etc/php-fpm.conf
-ExecStop=/bin/kill -INT $MAINPID
-ExecReload=/bin/kill -USR2 $MAINPID
+ExecStart={$SERVER_PATH}/php/init.d/php{$VERSION} start
+ExecStop={$SERVER_PATH}/php/init.d/php{$VERSION} stop
+ExecReload={$SERVER_PATH}/php/init.d/php{$VERSION} reload
PrivateTmp=false
[Install]
diff --git a/plugins/socket5/LICENSE b/plugins/socket5/LICENSE
deleted file mode 100644
index b89fade39..000000000
--- a/plugins/socket5/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2019 Mr Chen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/plugins/socket5/ico.png b/plugins/socket5/ico.png
deleted file mode 100644
index 2c21d0545..000000000
Binary files a/plugins/socket5/ico.png and /dev/null differ
diff --git a/plugins/socket5/index.html b/plugins/socket5/index.html
deleted file mode 100755
index dc17059b5..000000000
--- a/plugins/socket5/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
\ No newline at end of file
diff --git a/plugins/socket5/index.py b/plugins/socket5/index.py
deleted file mode 100755
index c10f99088..000000000
--- a/plugins/socket5/index.py
+++ /dev/null
@@ -1,207 +0,0 @@
-# coding:utf-8
-
-import sys
-import io
-import os
-import time
-import shutil
-
-sys.path.append(os.getcwd() + "/class/core")
-import mw
-
-app_debug = False
-if mw.isAppleSystem():
- app_debug = True
-
-
-def getPluginName():
- return 'socket5'
-
-
-def getPluginDir():
- return mw.getPluginDir() + '/' + getPluginName()
-
-
-def getServerDir():
- return mw.getServerDir() + '/' + getPluginName()
-
-
-def getInitDFile():
- if app_debug:
- return '/tmp/' + getPluginName()
- return '/etc/init.d/ss5'
-
-
-def initDreplace():
- return getPluginDir() + '/init.d/ss5'
-
-
-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():
- cmd = "ps -ef|grep ss5 |grep -v grep | grep -v python | awk '{print $2}'"
- data = mw.execShell(cmd)
- if data[0] == '':
- return 'stop'
- return 'start'
-
-
-def initConf():
- ss5_conf = getServerDir() + '/ss5.conf'
- if not os.path.exists(ss5_conf):
- tmp = getPluginDir() + '/tmp/ss5.conf'
- if not os.path.exists(tmp):
- mw.execShell('cp -rf ' + tmp + ' /etc/opt/ss5')
- mw.execShell('cp -rf ' + tmp + ' ' + getServerDir())
-
- init_file = '/etc/init.d/ss5'
- if os.path.exists(init_file):
- mw.execShell('chmod +x ' + init_file)
-
- ss5_pwd = getServerDir() + '/ss5.passwd'
- if not os.path.exists(ss5_pwd):
- tmp = getPluginDir() + '/tmp/ss5.passwd'
-
- if not os.path.exists(tmp):
- mw.execShell('cp -rf ' + tmp + ' /etc/opt/ss5')
- mw.execShell('cp -rf ' + tmp + ' ' + getServerDir())
-
-
-def start():
- initConf()
-
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- data = mw.execShell('service ss5 start')
- if data[1] == '':
- return 'ok'
- return data[1]
-
-
-def stop():
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- data = mw.execShell('service ss5 stop')
- if data[1] == '':
- return 'ok'
- return data[1]
-
-
-def restart():
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- data = mw.execShell('service ss5 restart')
- if data[1] == '':
- return 'ok'
- return data[1]
-
-
-def reload():
- data = mw.execShell('service ss5 reload')
- if data[1] == '':
- return 'ok'
- return data[1]
-
-
-def getPathFile():
- if mw.isAppleSystem():
- return getServerDir() + '/ss5.conf'
- return '/etc/opt/ss5/ss5.conf'
-
-
-def getPathFilePwd():
- if mw.isAppleSystem():
- return getServerDir() + '/ss5.passwd'
- return '/etc/opt/ss5/ss5.passwd'
-
-
-def getPathFilePort():
- return '/etc/sysconfig/ss5'
-
-
-def initdStatus():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
- initd_bin = getInitDFile()
- if os.path.exists(initd_bin):
- return 'ok'
- return 'fail'
-
-
-def initdInstall():
- import shutil
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- source_bin = initDreplace()
- initd_bin = getInitDFile()
- shutil.copyfile(source_bin, initd_bin)
- mw.execShell('chmod +x ' + initd_bin)
- mw.execShell('chkconfig --add ' + getPluginName())
- return 'ok'
-
-
-def initdUinstall():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- mw.execShell('chkconfig --del ' + getPluginName())
- initd_bin = getInitDFile()
- os.remove(initd_bin)
- return 'ok'
-
-
-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 == 'conf':
- print(getPathFile())
- elif func == 'conf_pwd':
- print(getPathFilePwd())
- elif func == 'conf_port':
- print(getPathFilePort())
- elif func == 'initd_status':
- print(initdStatus())
- elif func == 'initd_install':
- print(initdInstall())
- elif func == 'initd_uninstall':
- print(initdUinstall())
- else:
- print('error')
diff --git a/plugins/socket5/info.json b/plugins/socket5/info.json
deleted file mode 100755
index 8381e50e4..000000000
--- a/plugins/socket5/info.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "title":"socket5",
- "tip":"soft",
- "name":"socket5",
- "type":"运行环境",
- "ps":"socket5",
- "versions":"1.0",
- "shell":"install.sh",
- "checks":"server/socket5",
- "author":"midoks",
- "home":"https://github.com/teddysun/across/blob/master/socket5.sh",
- "date":"2021-01-29",
- "pid": "5"
-}
\ No newline at end of file
diff --git a/plugins/socket5/init.d/ss5 b/plugins/socket5/init.d/ss5
deleted file mode 100644
index ee7790b75..000000000
--- a/plugins/socket5/init.d/ss5
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-#
-# chkconfig: 345 20 80
-# description: This script takes care of starting \
-# and stopping ss5
-#
-
-OS=`uname -s`
-if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
-
-# Source function library.
- . /etc/rc.d/init.d/functions
-
-# Source networking configuration.
- . /etc/sysconfig/network
-
-# Check that networking is up.
- [ ${NETWORKING} = "no" ] && exit 0
-
- [ -f /usr/sbin/ss5 ] || exit 0
-fi
-
-# Test custom variables
-test -f /etc/sysconfig/ss5 && . /etc/sysconfig/ss5
-
-# See how we were called.
-case "$1" in
- start)
- # Start daemon.
- echo -n "Starting ss5... "
- if [ $OS = "Linux" ]; then
- daemon /usr/sbin/ss5 -t $SS5_OPTS
- touch /var/lock/subsys/ss5
- else
- if [ $OS = "SunOS" ]; then
- /usr/sbin/ss5 -t
- touch /var/lock/subsys/ss5
- else
- /usr/local/sbin/ss5 -t
- fi
- fi
- echo "done"
- ;;
- stop)
- # Stop daemon.
- echo "Shutting down ss5... "
- if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
- killproc ss5
- rm -f /var/lock/subsys/ss5
- else
- killall ss5
- fi
- rm -f /var/run/ss5/ss5.pid
- echo "done"
- ;;
- reload)
- # Reload configuration
- if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
- echo -n "Reloading ss5... "
- killproc ss5 -1
- else
- pkill -HUP ss5
- fi
- echo "done reload"
- ;;
- restart)
- # Restart daemon
- echo -n "Restarting ss5... "
- $0 stop
- $0 start
- ;;
- status)
- if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
- status ss5
- fi
- ;;
- *)
- echo "Usage: ss5 {start|stop|status|restart|reload}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/plugins/socket5/install.sh b/plugins/socket5/install.sh
deleted file mode 100755
index a2d35cf4f..000000000
--- a/plugins/socket5/install.sh
+++ /dev/null
@@ -1,49 +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")
-
-
-install_tmp=${rootPath}/tmp/mw_install.pl
-SYSOS=`uname`
-
-Install_socket5()
-{
- yum -y install gcc automake make pam-devel openldap-devel cyrus-sasl-devel
-
- isStart=""
- echo '正在安装脚本文件...' > $install_tmp
- mkdir -p $serverPath/source
- mkdir -p $serverPath/socket5
-
- if [ ! -f $serverPath/source/ss5-3.8.9-8.tar.gz ];then
- wget -O $serverPath/source/ss5-3.8.9-8.tar.gz http://downloads.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz
- fi
- echo '1.0' > $serverPath/socket5/version.pl
-
- cd $serverPath/source && tar -xzvf ss5-3.8.9-8.tar.gz
- cd $serverPath/source/ss5-3.8.9 && ./configure && make && make install
-
- echo 'install complete' > $install_tmp
-}
-
-Uninstall_socket5()
-{
- rm -rf $serverPath/socket5
- rm -rf /usr/sbin/ss5
- service ss5 stop
- rm -rf /etc/init.d/ss5
- echo "Uninstall completed" > $install_tmp
-}
-
-action=$1
-if [ "${1}" == 'install' ];then
- Install_socket5
-else
- Uninstall_socket5
-fi
diff --git a/plugins/socket5/js/socket5.js b/plugins/socket5/js/socket5.js
deleted file mode 100755
index 800fe95d1..000000000
--- a/plugins/socket5/js/socket5.js
+++ /dev/null
@@ -1,57 +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 lpPost(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:'l2tp', 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 lpAsyncPost(method,args){
- var _args = null;
- if (typeof(args) == 'string'){
- _args = JSON.stringify(str2Obj(args));
- } else {
- _args = JSON.stringify(args);
- }
-
- var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
- return syncPost('/plugins/run', {name:'l2tp', func:method, args:_args});
-}
-
-function readme(){
- var readme = '';
- readme += '- 默认需开放端口:UDP:1080
';
- readme += '- 参考
';
- readme += '
';
- $('.soft-man-con').html(readme);
-}
diff --git a/plugins/socket5/tmp/ss5.conf b/plugins/socket5/tmp/ss5.conf
deleted file mode 100755
index 8bda3c201..000000000
--- a/plugins/socket5/tmp/ss5.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# 无用户配置
-auth 0.0.0.0/0 - -
-permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -
-
-
-# 用户配置
-#auth 0.0.0.0/0 - u
-#permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -
\ No newline at end of file
diff --git a/plugins/socket5/tmp/ss5.passwd b/plugins/socket5/tmp/ss5.passwd
deleted file mode 100755
index 4be3c4508..000000000
--- a/plugins/socket5/tmp/ss5.passwd
+++ /dev/null
@@ -1 +0,0 @@
-test test
\ No newline at end of file
diff --git a/plugins/sys-opt/info.json b/plugins/sys-opt/info.json
index b1e7138c2..b8acc16ab 100755
--- a/plugins/sys-opt/info.json
+++ b/plugins/sys-opt/info.json
@@ -12,5 +12,5 @@
"author":"midoks",
"home":"",
"date":"2018-12-20",
- "pid":"4"
+ "pid":"5"
}
\ No newline at end of file
diff --git a/plugins/v2ray/ico.png b/plugins/v2ray/ico.png
deleted file mode 100644
index b5047906b..000000000
Binary files a/plugins/v2ray/ico.png and /dev/null differ
diff --git a/plugins/v2ray/index.html b/plugins/v2ray/index.html
deleted file mode 100755
index 821690d51..000000000
--- a/plugins/v2ray/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
\ No newline at end of file
diff --git a/plugins/v2ray/index.py b/plugins/v2ray/index.py
deleted file mode 100755
index d8d1102a7..000000000
--- a/plugins/v2ray/index.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# coding:utf-8
-
-import sys
-import io
-import os
-import time
-import shutil
-
-sys.path.append(os.getcwd() + "/class/core")
-import mw
-
-app_debug = False
-if mw.isAppleSystem():
- app_debug = True
-
-
-def getPluginName():
- return 'v2ray'
-
-
-def getPluginDir():
- return mw.getPluginDir() + '/' + getPluginName()
-
-
-def getServerDir():
- return mw.getServerDir() + '/' + getPluginName()
-
-
-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():
- cmd = "ps -ef|grep v2ray |grep -v grep | grep -v 'mdserver-web'| awk '{print $2}'"
- data = mw.execShell(cmd)
- if data[0] == '':
- return 'stop'
- return 'start'
-
-
-def start():
-
- shell_cmd = 'service ' + getPluginName() + ' start'
- data = mw.execShell(shell_cmd)
-
- if data[0] == '':
- return 'ok'
- return data[1]
-
-
-def stop():
- shell_cmd = 'service ' + getPluginName() + ' stop'
-
- data = mw.execShell(shell_cmd)
- if data[0] == '':
- return 'ok'
- return data[1]
-
-
-def restart():
- shell_cmd = 'service ' + getPluginName() + ' restart'
- data = mw.execShell(shell_cmd)
-
- log_file = getLog()
- if os.path.exists(log_file):
- clear_log_cmd = "echo '' > " + log_file
- mw.execShell(clear_log_cmd)
-
- if data[0] == '':
- return 'ok'
- return data[1]
-
-
-def reload():
- shell_cmd = 'service ' + getPluginName() + ' reload'
- data = mw.execShell(shell_cmd)
- if data[0] == '':
- return 'ok'
- return data[1]
-
-
-def getPathFile():
- if mw.isAppleSystem():
- return getServerDir() + '/config.json'
- return '/usr/local/etc/v2ray/config.json'
-
-
-def getInitDFile():
- if app_debug:
- return '/tmp/' + getPluginName()
- return '/etc/init.d/' + getPluginName()
-
-
-def initdStatus():
- shell_cmd = 'systemctl status v2ray.service | grep loaded | grep "enabled;"'
- data = mw.execShell(shell_cmd)
- if data[0] == '':
- return 'fail'
- return 'ok'
-
-
-def initdInstall():
- import shutil
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- mw.execShell('systemctl enable ' + getPluginName())
- return 'ok'
-
-
-def initdUinstall():
- if not app_debug:
- if mw.isAppleSystem():
- return "Apple Computer does not support"
-
- mw.execShell('systemctl disable ' + getPluginName())
- return 'ok'
-
-
-def getLog():
- return '/var/log/v2ray/access.log'
-
-
-def getErrLog():
- return '/var/log/v2ray/error.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 == 'conf':
- print(getPathFile())
- 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 == 'error_log':
- print(getErrLog())
- else:
- print('error')
diff --git a/plugins/v2ray/info.json b/plugins/v2ray/info.json
deleted file mode 100755
index 3998b0d9f..000000000
--- a/plugins/v2ray/info.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "title":"v2ray",
- "tip":"soft",
- "name":"v2ray",
- "type":"运行环境",
- "ps":"v2ray",
- "versions":"1.0",
- "shell":"install.sh",
- "checks":"server/v2ray",
- "path": "server/v2ray",
- "author":"midoks",
- "home":"https://github.com/v2ray/v2ray-core",
- "date":"2020-06-08",
- "pid": "5"
-}
\ No newline at end of file
diff --git a/plugins/v2ray/install.sh b/plugins/v2ray/install.sh
deleted file mode 100755
index 4711b0ac7..000000000
--- a/plugins/v2ray/install.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
-export PATH
-
-# case1 https://toutyrater.github.io/advanced/wss_and_web.html
-
-
-curPath=`pwd`
-rootPath=$(dirname "$curPath")
-rootPath=$(dirname "$rootPath")
-serverPath=$(dirname "$rootPath")
-
-
-install_tmp=${rootPath}/tmp/mw_install.pl
-
-SYSOS=`uname`
-
-Install_v2ray()
-{
- isStart=""
- echo '正在安装脚本文件...' > $install_tmp
- mkdir -p $serverPath/v2ray
- echo '1.0' > $serverPath/v2ray/version.pl
-
- if [ "Darwin" == "$SYSOS" ];then
- echo 'macosx unavailable' > $install_tmp
- cat $curPath/tmp/v2ray.json > /usr/local/etc/v2ray/config.json
- exit 0
- fi
-
- bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
- cat $curPath/tmp/v2ray.json > /usr/local/etc/v2ray/config.json
-
- echo 'install complete' > $install_tmp
-}
-
-Uninstall_v2ray()
-{
- rm -rf $serverPath/v2ray
- echo "Uninstall completed" > $install_tmp
-}
-
-action=$1
-if [ "${1}" == 'install' ];then
- Install_v2ray
-else
- Uninstall_v2ray
-fi
diff --git a/plugins/v2ray/js/shadowsocks.js b/plugins/v2ray/js/shadowsocks.js
deleted file mode 100755
index ebfaed948..000000000
--- a/plugins/v2ray/js/shadowsocks.js
+++ /dev/null
@@ -1,92 +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 lpPost(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:'shadowsocks', 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 lpAsyncPost(method,args){
- var _args = null;
- if (typeof(args) == 'string'){
- _args = JSON.stringify(str2Obj(args));
- } else {
- _args = JSON.stringify(args);
- }
-
- var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
- return syncPost('/plugins/run', {name:'l2tp', func:method, args:_args});
-}
-
-function userList(){
- lpPost('user_list', '' ,function(data){
- var rdata = $.parseJSON(data['data']);
-
- if (!rdata['status']){
- layer.msg(rdata.msg,{icon:0,time:2000,shade: [0.3, '#000']});
- return;
- }
- var list = rdata['data'];
-
- var con = '';
- con += '';
- con += '';
- con += '用户 | ';
- con += '密码 | ';
- con += '操作(添加) | ';
- con += '
';
-
- con += '';
-
- for (var i = 0; i < list.length; i++) {
- con += ''+
- '' + list[i]['user']+' | ' +
- '' + list[i]['pwd']+' | ' +
- '改密|删除 |
';
- }
-
- con += '';
- con += '
';
-
- $(".soft-man-con").html(con);
- });
-}
-
-
-
-function readme(){
- var readme = '';
- readme += '- 需开放配置文件[port_password]端口
';
- readme += '
';
- $('.soft-man-con').html(readme);
-}
diff --git a/plugins/v2ray/tmp/v2ray.json b/plugins/v2ray/tmp/v2ray.json
deleted file mode 100644
index 8b0c7dde3..000000000
--- a/plugins/v2ray/tmp/v2ray.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "log" : {
- "access" : "/var/log/v2ray/access.log",
- "error" : "/var/log/v2ray/error.log",
- "loglevel":"warning"
- },
- "inbounds": [{
- "port": 34861,
- "listen": "127.0.0.1",
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id": "6e1e5234-05ee-45fe-b28d-80e91edb7f30",
- "alterId": 64
- }
- ]
- },
- "streamSettings":{
- "network": "ws",
- "wsSettings": {
- "path": "/ws"
- }
- }
- }],
- "outbounds": [{
- "protocol": "freedom",
- "settings": {}
- },{
- "protocol": "blackhole",
- "settings": {},
- "tag": "blocked"
- }],
- "routing": {
- "rules": [
- {
- "type": "field",
- "ip": ["geoip:private"],
- "outboundTag": "blocked"
- }
- ]
- },
- "inboundDetour": [
- {
- "protocol": "shadowsocks",
- "port": 30008,
- "settings": {
- "method": "aes-128-gcm",
- "password": "123123123",
- "udp": false
- }
- }
- ]
-}
diff --git a/scripts/install.sh b/scripts/install.sh
index a2aff5817..44552dddb 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -32,22 +32,45 @@ if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
+ yum install -y wget zip unzip
elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
OSNAME='fedora'
+ yum install -y wget zip unzip
elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
OSNAME='rocky'
+ yum install -y wget zip unzip
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
OSNAME='alma'
+ yum install -y wget zip unzip
elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
OSNAME='debian'
+ apt install -y wget zip unzip
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
+ apt install -y wget zip unzip
elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
OSNAME='raspbian'
else
OSNAME='unknow'
fi
+
+if [ $OSNAME != "macos" ];then
+ mkdir -p /www/server
+ mkdir -p /www/wwwroot
+ mkdir -p /www/wwwlogs
+ mkdir -p /www/backup/database
+ mkdir -p /www/backup/site
+
+ if [ ! -d /www/server/mdserver-web ];then
+ wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
+ cd /tmp && unzip /tmp/master.zip
+ mv /tmp/mdserver-web-master /www/server/mdserver-web
+ rm -rf /tmp/master.zip
+ rm -rf /tmp/mdserver-web-master
+ fi
+fi
+
echo "use system version: ${OSNAME}"
curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install/${OSNAME}.sh | bash
diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh
index afb286868..c396c9792 100755
--- a/scripts/install/alma.sh
+++ b/scripts/install/alma.sh
@@ -3,11 +3,6 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=C.UTF-8
-mkdir -p /www/server
-mkdir -p /www/wwwroot
-mkdir -p /www/wwwlogs
-mkdir -p /www/backup/database
-mkdir -p /www/backup/site
if [ ! -f /usr/bin/applydeltarpm ];then
@@ -38,7 +33,7 @@ if [ -f /etc/init.d/iptables ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
- iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
service iptables save
iptables_status=`service iptables status | grep 'not running'`
@@ -62,7 +57,7 @@ if [ ! -f /etc/init.d/iptables ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
firewall-cmd --permanent --zone=public --add-port=3306/tcp
- firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh
index 591e37696..49ae894eb 100755
--- a/scripts/install/centos.sh
+++ b/scripts/install/centos.sh
@@ -3,13 +3,6 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8
-mkdir -p /www/server
-mkdir -p /www/wwwroot
-mkdir -p /www/wwwlogs
-mkdir -p /www/backup/database
-mkdir -p /www/backup/site
-
-
if [ ! -f /usr/bin/applydeltarpm ];then
yum -y provides '*/applydeltarpm'
yum -y install deltarpm
@@ -23,9 +16,9 @@ yum install -y wget lsof crontabs
yum install -y python3-devel
yum install -y python-devel
yum install -y vixie-cron
+yum install -y curl-devel libmcrypt libmcrypt-devel
#https need
-
if [ ! -d /root/.acme.sh ];then
curl https://get.acme.sh | sh
fi
@@ -38,7 +31,7 @@ if [ -f /etc/init.d/iptables ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
- iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
service iptables save
iptables_status=`service iptables status | grep 'not running'`
@@ -62,7 +55,7 @@ if [ ! -f /etc/init.d/iptables ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
firewall-cmd --permanent --zone=public --add-port=3306/tcp
- firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
@@ -76,27 +69,13 @@ systemctl stop firewalld
yum groupinstall -y "Development Tools"
yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel
-yum install -y wget python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel
+yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel
+yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel
yum install -y lsof net-tools
yum install -y ncurses-devel mysql-devel cmake
yum install -y MySQL-python
yum install -y epel-release
-if [ ! -d /www/server/mdserver-web ];then
- wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
- cd /tmp && unzip /tmp/master.zip
- mv /tmp/mdserver-web-master /www/server/mdserver-web
- rm -rf /tmp/master.zip
- rm -rf /tmp/mdserver-web-master
-fi
-
-#if [ ! -f '/usr/bin/pip' ];then
-# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
-# python get-pip.py
-# pip install --upgrade pip
-# pip install pillow==6.2.2
-#fi
-
if [ ! -f /usr/local/bin/pip3 ];then
python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple
@@ -113,21 +92,28 @@ fi
if [ -f /www/server/mdserver-web/bin/activate ];then
cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt
+ pip install --upgrade pip
+ pip3 install gunicorn==20.1.0
+ pip3 install gevent==21.1.2
+ pip3 install gevent-websocket==0.10.1
+ pip3 install requests==2.20.0
+ pip3 install flask-caching==1.10.1
+ pip3 install python-socketio==4.2.0
+ pip3 install psutil==5.9.1
+ pip3 install pymongo
else
+ pip install --upgrade pip
cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt
+ pip3 install gunicorn==20.1.0
+ pip3 install gevent==21.1.2
+ pip3 install gevent-websocket==0.10.1
+ pip3 install requests==2.20.0
+ pip3 install flask-caching==1.10.1
+ pip3 install python-socketio==4.2.0
+ pip3 install psutil==5.9.1
+ pip3 install pymongo
fi
-pip install --upgrade pip
-pip3 install gunicorn==20.1.0
-pip3 install gevent==21.1.2
-pip3 install gevent-websocket==0.10.1
-pip3 install requests==2.20.0
-pip3 install flask-caching==1.10.1
-pip3 install python-socketio==4.2.0
-pip3 install psutil==5.9.1
-pip3 install pymongo
-
-
cd /www/server/mdserver-web && ./cli.sh start
sleep 5
diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh
index 769e2fbc0..c3f2a19a4 100644
--- a/scripts/install/debian.sh
+++ b/scripts/install/debian.sh
@@ -4,12 +4,6 @@ export PATH
LANG=en_US.UTF-8
-mkdir -p /www/server
-mkdir -p /www/wwwroot
-mkdir -p /www/wwwlogs
-mkdir -p /www/backup/database
-mkdir -p /www/backup/site
-
apt update -y
@@ -31,7 +25,7 @@ if [ -f /usr/sbin/ufw ];then
ufw allow 888/tcp
ufw allow 7200/tcp
ufw allow 3306/tcp
- ufw allow 30000:40000/tcp
+ # ufw allow 30000:40000/tcp
fi
@@ -53,7 +47,7 @@ if [ ! -f /usr/sbin/ufw ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
firewall-cmd --permanent --zone=public --add-port=3306/tcp
- firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
# fix:debian10 firewalld faq
# https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled/fang-huo-qiang#debian-10-firewalld-0.6.3-error-commandfailed-usrsbinip6tablesrestorewn-failed-ip6tablesrestore-v1.8
@@ -66,15 +60,6 @@ fi
systemctl stop firewalld
-if [ ! -d /www/server/mdserver-web ];then
- wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
- cd /tmp && unzip /tmp/master.zip
- mv /tmp/mdserver-web-master /www/server/mdserver-web
- rm -rf /tmp/master.zip
- rm -rf /tmp/mdserver-web-master
-fi
-
-
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh
index 44b9ba7c5..1d75f4106 100644
--- a/scripts/install/fedora.sh
+++ b/scripts/install/fedora.sh
@@ -3,12 +3,6 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8
-mkdir -p /www/server
-mkdir -p /www/wwwroot
-mkdir -p /www/wwwlogs
-mkdir -p /www/backup/database
-mkdir -p /www/backup/site
-
if [ ! -f /usr/bin/applydeltarpm ];then
yum -y provides '*/applydeltarpm'
@@ -36,7 +30,7 @@ if [ -f /etc/init.d/iptables ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
- iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
service iptables save
iptables_status=`service iptables status | grep 'not running'`
@@ -62,7 +56,7 @@ if [ "${isVersion}" == '' ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
firewall-cmd --permanent --zone=public --add-port=3306/tcp
- firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
firewall-cmd --reload
fi
fi
@@ -82,15 +76,7 @@ yum -y install ncurses-devel mysql-devel cmake
yum -y install python-devel
yum -y install MySQL-python
yum -y install epel-release
-yum -y install python36-devel
-
-if [ ! -d /www/server/mdserver-web ];then
- wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
- cd /tmp && unzip /tmp/master.zip
- mv /tmp/mdserver-web-master /www/server/mdserver-web
- rm -rf /tmp/master.zip
- rm -rf /tmp/mdserver-web-master
-fi
+yum -y install python3-devel
diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh
index 591e37696..f816a499b 100644
--- a/scripts/install/rocky.sh
+++ b/scripts/install/rocky.sh
@@ -3,12 +3,6 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8
-mkdir -p /www/server
-mkdir -p /www/wwwroot
-mkdir -p /www/wwwlogs
-mkdir -p /www/backup/database
-mkdir -p /www/backup/site
-
if [ ! -f /usr/bin/applydeltarpm ];then
yum -y provides '*/applydeltarpm'
@@ -38,7 +32,7 @@ if [ -f /etc/init.d/iptables ];then
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
- iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
+ # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT
service iptables save
iptables_status=`service iptables status | grep 'not running'`
@@ -62,7 +56,7 @@ if [ ! -f /etc/init.d/iptables ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
firewall-cmd --permanent --zone=public --add-port=3306/tcp
- firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
sed -i 's#AllowZoneDrifting=yes#AllowZoneDrifting=no#g' /etc/firewalld/firewalld.conf
@@ -82,14 +76,6 @@ yum install -y ncurses-devel mysql-devel cmake
yum install -y MySQL-python
yum install -y epel-release
-if [ ! -d /www/server/mdserver-web ];then
- wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
- cd /tmp && unzip /tmp/master.zip
- mv /tmp/mdserver-web-master /www/server/mdserver-web
- rm -rf /tmp/master.zip
- rm -rf /tmp/mdserver-web-master
-fi
-
#if [ ! -f '/usr/bin/pip' ];then
# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
# python get-pip.py
diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh
index 282efe9c0..e31ddb5ea 100644
--- a/scripts/install/ubuntu.sh
+++ b/scripts/install/ubuntu.sh
@@ -4,13 +4,6 @@ export PATH
LANG=en_US.UTF-8
-
-mkdir -p /www/server
-mkdir -p /www/wwwroot
-mkdir -p /www/wwwlogs
-mkdir -p /www/backup/database
-mkdir -p /www/backup/site
-
apt update -y
apt install -y wget curl lsof unzip
@@ -32,7 +25,7 @@ if [ -f /usr/sbin/ufw ];then
ufw allow 888/tcp
ufw allow 7200/tcp
ufw allow 3306/tcp
- ufw allow 30000:40000/tcp
+ # ufw allow 30000:40000/tcp
fi
@@ -52,7 +45,7 @@ if [ ! -f /usr/sbin/ufw ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
firewall-cmd --permanent --zone=public --add-port=3306/tcp
- firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+ # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
# fix:debian10 firewalld faq
# https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled/fang-huo-qiang#debian-10-firewalld-0.6.3-error-commandfailed-usrsbinip6tablesrestorewn-failed-ip6tablesrestore-v1.8
@@ -64,14 +57,6 @@ fi
#安装时不开启
systemctl stop firewalld
-if [ ! -d /www/server/mdserver-web ];then
- wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
- cd /tmp && unzip /tmp/master.zip
- mv /tmp/mdserver-web-master /www/server/mdserver-web
- rm -rf /tmp/master.zip
- rm -rf /tmp/mdserver-web-master
-fi
-
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh
new file mode 100755
index 000000000..eae9bc696
--- /dev/null
+++ b/scripts/install_cn.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+is64bit=`getconf LONG_BIT`
+
+if [ -f /etc/motd ];then
+ echo "welcome to mdserver-web panel" > /etc/motd
+fi
+
+startTime=`date +%s`
+
+_os=`uname`
+echo "use system: ${_os}"
+
+if [ "$EUID" -ne 0 ]
+ then echo "Please run as root!"
+ exit
+fi
+
+if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
+
+if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ ln -sf /bin/bash /bin/sh
+fi
+
+
+if [ ${_os} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+ yum install -y wget zip unzip
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+ yum install -y wget zip unzip
+elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
+ OSNAME='rocky'
+ yum install -y wget zip unzip
+elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
+ OSNAME='alma'
+ yum install -y wget zip unzip
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+ apt install -y wget zip unzip
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+ apt install -y wget zip unzip
+elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
+ OSNAME='raspbian'
+else
+ OSNAME='unknow'
+fi
+
+
+if [ $OSNAME != "macos" ];then
+ mkdir -p /www/server
+ mkdir -p /www/wwwroot
+ mkdir -p /www/wwwlogs
+ mkdir -p /www/backup/database
+ mkdir -p /www/backup/site
+
+ if [ ! -d /www/server/mdserver-web ];then
+ wget -O /tmp/master.zip https://gitee.com/midoks/mdserver-web/repository/archive/master.zip
+ cd /tmp && unzip /tmp/master.zip
+ mv /tmp/mdserver-web-master /www/server/mdserver-web
+ rm -rf /tmp/master.zip
+ rm -rf /tmp/mdserver-web-master
+ fi
+fi
+
+echo "use system version: ${OSNAME}"
+curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/install/${OSNAME}.sh | bash
+
+
+endTime=`date +%s`
+((outTime=(${endTime}-${startTime})/60))
+echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
\ No newline at end of file
diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh
new file mode 100755
index 000000000..643698616
--- /dev/null
+++ b/scripts/install_dev.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+is64bit=`getconf LONG_BIT`
+
+if [ -f /etc/motd ];then
+ echo "welcome to mdserver-web panel" > /etc/motd
+fi
+
+startTime=`date +%s`
+
+_os=`uname`
+echo "use system: ${_os}"
+
+if [ "$EUID" -ne 0 ]
+ then echo "Please run as root!"
+ exit
+fi
+
+if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
+
+if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ ln -sf /bin/bash /bin/sh
+fi
+
+
+if [ ${_os} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+ yum install -y wget zip unzip
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+ yum install -y wget zip unzip
+elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
+ OSNAME='rocky'
+ yum install -y wget zip unzip
+elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
+ OSNAME='alma'
+ yum install -y wget zip unzip
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+ apt install -y wget zip unzip
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+ apt install -y wget zip unzip
+elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
+ OSNAME='raspbian'
+else
+ OSNAME='unknow'
+fi
+
+
+if [ $OSNAME != "macos" ];then
+ mkdir -p /www/server
+ mkdir -p /www/wwwroot
+ mkdir -p /www/wwwlogs
+ mkdir -p /www/backup/database
+ mkdir -p /www/backup/site
+
+ if [ ! -d /www/server/mdserver-web ];then
+ wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip
+ cd /tmp && unzip /tmp/dev.zip
+ mv /tmp/mdserver-web-dev /www/server/mdserver-web
+ rm -rf /tmp/dev.zip
+ rm -rf /tmp/mdserver-web-dev
+ fi
+fi
+
+echo "use system version: ${OSNAME}"
+curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/install/${OSNAME}.sh | bash
+
+
+endTime=`date +%s`
+((outTime=(${endTime}-${startTime})/60))
+echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
\ No newline at end of file
diff --git a/scripts/update.sh b/scripts/update.sh
index 12ba7f503..00fa5321d 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -22,22 +22,34 @@ if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
+ yum install -y wget zip unzip
elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
OSNAME='fedora'
+ yum install -y wget zip unzip
elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
OSNAME='rocky'
+ yum install -y wget zip unzip
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
OSNAME='alma'
+ yum install -y wget zip unzip
elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
OSNAME='debian'
+ apt install -y wget zip unzip
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
+ apt install -y wget zip unzip
elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
OSNAME='raspbian'
else
OSNAME='unknow'
fi
+wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
+cd /tmp && unzip /tmp/master.zip
+/usr/bin/cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
+rm -rf /tmp/master.zip
+rm -rf /tmp/mdserver-web-master
+
#pip uninstall public
echo "use system version: ${OSNAME}"
curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/update/${OSNAME}.sh | bash
diff --git a/scripts/update/alma.sh b/scripts/update/alma.sh
index e5c18ec48..a5f2cf78f 100755
--- a/scripts/update/alma.sh
+++ b/scripts/update/alma.sh
@@ -10,14 +10,8 @@ fi
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
-wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
-cd /tmp && unzip /tmp/master.zip
-/usr/bin/cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
-rm -rf /tmp/master.zip
-rm -rf /tmp/mdserver-web-master
-
-yum install -y curl-devel libmcrypt libmcrypt-devel python36-devel
+yum install -y curl-devel libmcrypt libmcrypt-devel python3-devel
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/update/centos.sh b/scripts/update/centos.sh
index 5cf933a59..6f1f75252 100755
--- a/scripts/update/centos.sh
+++ b/scripts/update/centos.sh
@@ -10,14 +10,9 @@ fi
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
-wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
-cd /tmp && unzip /tmp/master.zip
-/usr/bin/cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
-rm -rf /tmp/master.zip
-rm -rf /tmp/mdserver-web-master
+yum install -y curl-devel libmcrypt libmcrypt-devel python3-devel
-yum install -y curl-devel libmcrypt libmcrypt-devel python36-devel
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh
index 28de6f74b..a3eb1d282 100644
--- a/scripts/update/debian.sh
+++ b/scripts/update/debian.sh
@@ -5,13 +5,6 @@ LANG=en_US.UTF-8
-wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
-rm -rf /tmp/mdserver-web-master
-cd /tmp && unzip /tmp/master.zip
-cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
-rm -rf /tmp/master.zip
-rm -rf /tmp/mdserver-web-master
-
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/update/rocky.sh b/scripts/update/rocky.sh
index 5cf933a59..bca02d51a 100755
--- a/scripts/update/rocky.sh
+++ b/scripts/update/rocky.sh
@@ -10,11 +10,6 @@ fi
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
-wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
-cd /tmp && unzip /tmp/master.zip
-/usr/bin/cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
-rm -rf /tmp/master.zip
-rm -rf /tmp/mdserver-web-master
yum install -y curl-devel libmcrypt libmcrypt-devel python36-devel
diff --git a/scripts/update/ubuntu.sh b/scripts/update/ubuntu.sh
index cd89065cc..1fb1bf7cc 100644
--- a/scripts/update/ubuntu.sh
+++ b/scripts/update/ubuntu.sh
@@ -4,13 +4,6 @@ export PATH
LANG=en_US.UTF-8
-wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
-rm -rf /tmp/mdserver-web-master
-cd /tmp && unzip /tmp/master.zip
-cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
-rm -rf /tmp/master.zip
-rm -rf /tmp/mdserver-web-master
-
cd /www/server/mdserver-web/scripts && bash lib.sh
chmod 755 /www/server/mdserver-web/data
diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh
new file mode 100755
index 000000000..76cf4ac30
--- /dev/null
+++ b/scripts/update_cn.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+is64bit=`getconf LONG_BIT`
+
+startTime=`date +%s`
+
+_os=`uname`
+echo "use system: ${_os}"
+
+if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
+
+if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+fi
+
+if [ ${_os} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+ yum install -y wget zip unzip
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+ yum install -y wget zip unzip
+elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
+ OSNAME='rocky'
+ yum install -y wget zip unzip
+elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
+ OSNAME='alma'
+ yum install -y wget zip unzip
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+ apt install -y wget zip unzip
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+ apt install -y wget zip unzip
+elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
+ OSNAME='raspbian'
+else
+ OSNAME='unknow'
+fi
+
+wget -O /tmp/master.zip https://gitee.com/midoks/mdserver-web/repository/archive/master.zip
+cd /tmp && unzip /tmp/master.zip
+mv /tmp/mdserver-web-master /www/server/mdserver-web
+rm -rf /tmp/master.zip
+rm -rf /tmp/mdserver-web-master
+
+#pip uninstall public
+echo "use system version: ${OSNAME}"
+curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/update/${OSNAME}.sh | bash
+
+endTime=`date +%s`
+((outTime=($endTime-$startTime)/60))
+echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
\ No newline at end of file
diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh
new file mode 100755
index 000000000..35285da74
--- /dev/null
+++ b/scripts/update_dev.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
+export PATH
+LANG=en_US.UTF-8
+is64bit=`getconf LONG_BIT`
+
+startTime=`date +%s`
+
+_os=`uname`
+echo "use system: ${_os}"
+
+if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+ #sudo dpkg-reconfigure dash
+fi
+
+if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ sudo ln -sf /bin/bash /bin/sh
+fi
+
+if [ ${_os} == "Darwin" ]; then
+ OSNAME='macos'
+elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
+ OSNAME='centos'
+ yum install -y wget zip unzip
+elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
+ OSNAME='fedora'
+ yum install -y wget zip unzip
+elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
+ OSNAME='rocky'
+ yum install -y wget zip unzip
+elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
+ OSNAME='alma'
+ yum install -y wget zip unzip
+elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
+ OSNAME='debian'
+ apt install -y wget zip unzip
+elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
+ OSNAME='ubuntu'
+ apt install -y wget zip unzip
+elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
+ OSNAME='raspbian'
+else
+ OSNAME='unknow'
+fi
+
+wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip
+cd /tmp && unzip /tmp/dev.zip
+mv /tmp/mdserver-web-dev /www/server/mdserver-web
+rm -rf /tmp/dev.zip
+rm -rf /tmp/mdserver-web-dev
+
+#pip uninstall public
+echo "use system version: ${OSNAME}"
+curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/update/${OSNAME}.sh | bash
+
+endTime=`date +%s`
+((outTime=($endTime-$startTime)/60))
+echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
\ No newline at end of file