Update description
This commit is contained in:
parent
470b490d0a
commit
134e330e1d
@ -42,6 +42,10 @@ ex:
|
|||||||
format: -ex <数字> <FROM> <TO>
|
format: -ex <数字> <FROM> <TO>
|
||||||
usage: 汇率转换
|
usage: 汇率转换
|
||||||
|
|
||||||
|
google:
|
||||||
|
format: -google <无|搜索内容>
|
||||||
|
usage: 回复一条消息,或直接使用
|
||||||
|
|
||||||
speedtest:
|
speedtest:
|
||||||
format: -speedtest <无|节点ID|list|update>
|
format: -speedtest <无|节点ID|list|update>
|
||||||
usage: 服务器本地网络测速
|
usage: 服务器本地网络测速
|
||||||
|
27
install.sh
27
install.sh
@ -5,7 +5,7 @@ CONTAINER_NAME="sycgram"
|
|||||||
GITHUB_IMAGE_NAME="iwumingz/${CONTAINER_NAME}"
|
GITHUB_IMAGE_NAME="iwumingz/${CONTAINER_NAME}"
|
||||||
GITHUB_IMAGE_PATH="ghcr.io/${GITHUB_IMAGE_NAME}"
|
GITHUB_IMAGE_PATH="ghcr.io/${GITHUB_IMAGE_NAME}"
|
||||||
PROJECT_PATH="/opt/${CONTAINER_NAME}"
|
PROJECT_PATH="/opt/${CONTAINER_NAME}"
|
||||||
PROJECT_VERSION="v1.0.0"
|
PROJECT_VERSION="v1.0.2"
|
||||||
|
|
||||||
red='\033[0;31m'
|
red='\033[0;31m'
|
||||||
green='\033[0;32m'
|
green='\033[0;32m'
|
||||||
@ -85,6 +85,15 @@ stop_sycgram(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restart_sycgram(){
|
||||||
|
res=$(docker restart $(docker ps -a | grep ${GITHUB_IMAGE_NAME} | awk '{print $1}'))
|
||||||
|
if [[ $res ]];then
|
||||||
|
echo -e "${yellow}已重启sycgram...${plain}"
|
||||||
|
else
|
||||||
|
echo -e "${red}无法重启sycgram...${plain}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
view_docker_log(){
|
view_docker_log(){
|
||||||
docker logs -f $(docker ps -a | grep ${GITHUB_IMAGE_NAME} | awk '{print $1}')
|
docker logs -f $(docker ps -a | grep ${GITHUB_IMAGE_NAME} | awk '{print $1}')
|
||||||
}
|
}
|
||||||
@ -121,12 +130,13 @@ show_menu() {
|
|||||||
echo -e " ${green}1.${plain} 安装"
|
echo -e " ${green}1.${plain} 安装"
|
||||||
echo -e " ${green}2.${plain} 更新"
|
echo -e " ${green}2.${plain} 更新"
|
||||||
echo -e " ${green}3.${plain} 停止"
|
echo -e " ${green}3.${plain} 停止"
|
||||||
echo -e " ${green}4.${plain} 查看日志"
|
echo -e " ${green}4.${plain} 重启"
|
||||||
echo -e " ${green}5.${plain} 重新安装"
|
echo -e " ${green}5.${plain} 查看日志"
|
||||||
echo -e " ${green}6.${plain} 卸载"
|
echo -e " ${green}6.${plain} 重新安装"
|
||||||
|
echo -e " ${green}7.${plain} 卸载"
|
||||||
echo -e " ${green}0.${plain} 退出脚本"
|
echo -e " ${green}0.${plain} 退出脚本"
|
||||||
echo -n "请选择编号: "
|
echo -n "请选择编号: "
|
||||||
read -ep "请输入选择 [0-6]: " option
|
read -ep "请输入选择 [0-7]: " option
|
||||||
case "${option}" in
|
case "${option}" in
|
||||||
0)
|
0)
|
||||||
exit 0
|
exit 0
|
||||||
@ -141,12 +151,15 @@ show_menu() {
|
|||||||
stop_sycgram
|
stop_sycgram
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
view_docker_log
|
restart_sycgram
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
reinstall_sycgram
|
view_docker_log
|
||||||
;;
|
;;
|
||||||
6)
|
6)
|
||||||
|
reinstall_sycgram
|
||||||
|
;;
|
||||||
|
7)
|
||||||
uninstall_sycgram
|
uninstall_sycgram
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user