Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/plugins/op_waf/install.sh

40 lines
664 B

6 years ago
#!/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
Install_of(){
echo '正在安装脚本文件...' > $install_tmp
6 years ago
mkdir -p $serverPath/op_waf
if [ -f $serverPath/openresty ];then
mkdir -p $serverPath/openresty/nginx/conf/waf
fi
6 years ago
echo '0.1' > $serverPath/op_waf/version.pl
echo 'install ok' > $install_tmp
}
Uninstall_of(){
6 years ago
rm -rf $serverPath/op_waf
}
6 years ago
action=$1
type=$2
action=$1
if [ "${1}" == 'install' ];then
Install_of
6 years ago
else
Uninstall_of
6 years ago
fi