Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronYES committed May 15, 2022
1 parent b6b108b commit a4a9ac0
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
### 自用
### 自用-半成品
66 changes: 66 additions & 0 deletions aapanel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#! /bin/bash
# By Aaron
# https://github.com/AaronYES/aapanel

#彩色
red(){
echo -e "\033[31m\033[01m$1\033[0m"
}
green(){
echo -e "\033[32m\033[01m$1\033[0m"
}
yellow(){
echo -e "\033[33m\033[01m$1\033[0m"
}
blue(){
echo -e "\033[34m\033[01m$1\033[0m"
}
purple(){
echo -e "\033[35m\033[01m$1\033[0m"
}

# 下载aapanel面板
function aapanel-install(){
wget -O "/root/aapanel-install.sh" http://www.aapanel.com/script/install_6.0_en.sh
blue "下载完成,正在安装官网原版."
bash "/root/aapanel-install.sh"
}

# 降级aapanel(最后一个无广告版本)
function downgrade-official(){
wget -O "/root/LinuxPanel_EN-6.8.23.zip" http://node.aapanel.com/install/update/LinuxPanel_EN-6.8.23.zip
blue "下载完成,正在降级."
unzip LinuxPanel_EN-6.8.23.zip
cd /root/panel

}

# 菜单
function start_menu(){
clear
blue "aaPanel 面板工具箱"
purple "练手脚本 方便自己使用"
yellow " =================================================="
green " 1. CentOS/Debian/Ubuntu 安装 aaPanel"
yellow " --------------------------------------------------"
green " 2. 降级 6.8.23 版本 aaPanel(官网)"
green " 3. 降级 6.8.23 版本 aaPanel(GitHub仓库)"
yellow " --------------------------------------------------"
green " 0. 退出脚本"
echo
read -p "请输入数字:" menuNumberInput
case "$menuNumberInput" in
1 )
aapanel-install
;;
0 )
exit 1
;;
* )
clear
red "请输入正确数字 !"
start_menu
;;
esac
}
start_menu "first"
30 changes: 30 additions & 0 deletions downgrade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
LANG=en_US.UTF-8

# aapanel离线升级脚本

panel_path='/www/server/panel'

if [ ! -d $panel_path ];then
echo "当前未安装aapanel面板!"
exit 0;
fi

base_dir=$(cd "$(dirname "$0")";pwd)
if [ $base_dir = $panel_path ];then
echo "不能在面板根目录执行降级命令!"
exit 0;
fi

if [ ! -d $base_dir/class ];then
echo "没有找到降级文件!"
exit 0;
fi

rm -f $panel_path/*.pyc $panel_path/class/*.pyc
\cp -r -f $base_dir/. $panel_path/
/etc/init.d/bt restart
echo "===================================="
echo "已完成降级!"

0 comments on commit a4a9ac0

Please sign in to comment.