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/xui/install.sh

43 lines
754 B

5 months 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")
sysArch=`arch`
sysName=`uname`
# cd /www/server/mdserver-web && python3 plugins/mtproxy/index.py url
# cd /www/server/mdserver-web/plugins/xui && /bin/bash install.sh install 1.0
5 months ago
VERSION=$2
5 months ago
Install_app()
{
5 months ago
mkdir -p $serverPath/source
mkdir -p $serverPath/source/xui
mkdir -p $serverPath/xui
echo "$VERSION" > $serverPath/xui/version.pl
echo "curPath:$curPath"
5 months ago
5 months ago
echo '安装完成'
}
Uninstall_app()
{
5 months ago
rm -rf $serverPath/xui
5 months ago
echo '卸载完成'
}
action=$1
if [ "${1}" == 'install' ];then
Install_app $2
else
Uninstall_app $2
fi