diff --git a/ck_bilibili_helper.sh b/ck_bilibili_helper.sh index 1f6bf4f8..4673f680 100644 --- a/ck_bilibili_helper.sh +++ b/ck_bilibili_helper.sh @@ -17,10 +17,10 @@ check_jq_installed_status check_java_installed_status # shellcheck disable=SC2154 -if [ "${pannel}" == "qinglong" ]; then +if [ "${panel}" == "qinglong" ]; then bili_path="/ql/scripts/bilibili" conf_file="/ql/config/java_conf.json" -elif [ "${pannel}" == "elecv2p" ]; then +elif [ "${panel}" == "elecv2p" ]; then bili_path="/usr/local/app/script/Shell/checkinpanel/bilibili" conf_file="/usr/local/app/script/Lists/java_conf.json" fi diff --git a/utils_env.sh b/utils_env.sh index 4cd96b13..92138fc1 100644 --- a/utils_env.sh +++ b/utils_env.sh @@ -11,9 +11,9 @@ IS_DISPLAY_CONTEXT=1 # shellcheck disable=SC2034 check_env() { if [ -f "${V2P_FILE}" ]; then - pannel="elecv2p" + panel="elecv2p" elif [ -f "${QL_FILE}" ]; then - pannel="qinglong" + panel="qinglong" else CMD="$(grep -i pretty_name /etc/os-release 2>/dev/null | cut -d \" -f2) $(hostnamectl 2>/dev/null | grep -i system | cut -d : -f2) @@ -55,14 +55,15 @@ check_env() { source_config() { check_env if [ "${ENV_PATH}" ]; then - . "$ENV_PATH" - elif [ "${pannel}" = "elecv2p" ]; then - . "/usr/local/app/script/Lists/.env" - elif [ "${pannel}" = "qinglong" ]; then - . "/ql/config/.env" + ENV_FILE=$ENV_PATH + elif [ "${panel}" = "elecv2p" ]; then + ENV_FILE="/usr/local/app/script/Lists/.env" + elif [ "${panel}" = "qinglong" ]; then + ENV_FILE="/ql/config/.env" else - . env + ENV_FILE="./env" fi + . "${ENV_FILE}" || printf "%s 不存在,请检查,若配置过环境变量的可以忽略。" "${ENV_FILE}" # 是否显示上下文 默认是 if [ "${DISPLAY_CONTEXT}" -eq 0 ]; then IS_DISPLAY_CONTEXT=0 @@ -83,7 +84,7 @@ check_jq_installed_status() { if [ -z "$(command -v jq)" ]; then printf "jq 依赖没有安装,开始安装..." check_root - if [ "${pannel}" ]; then + if [ "${panel}" ]; then apk add --no-cache jq elif [ "${system}" = "centos" ]; then yum update && yum install jq -y @@ -105,7 +106,7 @@ check_java_installed_status() { if [ -z "$(command -v java)" ]; then printf "Java 依赖没有安装,开始安装..." check_root - if [ "${pannel}" ]; then + if [ "${panel}" ]; then apk add --no-cache openjdk8 fi if [ -z "$(command -v java)" ]; then diff --git a/utils_ver.py b/utils_ver.py index 37620e6d..b442546a 100644 --- a/utils_ver.py +++ b/utils_ver.py @@ -5,7 +5,7 @@ import requests -__version__ = "20211203-4-011" +__version__ = "20211203-4-021" ONLINE_VERSION = "" ver_re = re.compile("__version__ = .(\\d+-\\d+-...).")