Update gl-inet.sh

check bash env
This commit is contained in:
悟空的日常镜像仓库 2023-11-13 10:30:41 +08:00
parent a5fe38011b
commit b4856da740
1 changed files with 9 additions and 2 deletions

View File

@ -260,10 +260,17 @@ set_glfan_temp() {
echo "错误: 请输入整数."
fi
}
check_bash_installed() {
if [ -x "/bin/bash" ]; then
echo "rollback_old_version ......"
else
setup_software_source 0
opkg install bash
fi
}
rollback_old_version() {
setup_software_source 0
opkg install bash
check_bash_installed
download_url="https://github.com/wukongdaily/gl-inet-onescript/raw/1f25c161512e9b416227f60656e8c2139c993f69/gl-inet.run"
local_file_path="/tmp/gl-inet.run"
wget -O "$local_file_path" "$download_url"