From 1f4a83ee4446194ce90afccdbef0dc9087caa69a Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 11 Jul 2022 15:16:17 +0800 Subject: [PATCH] Update install.sh --- plugins/varnish/install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/varnish/install.sh b/plugins/varnish/install.sh index 63689d188..671e4adea 100755 --- a/plugins/varnish/install.sh +++ b/plugins/varnish/install.sh @@ -34,13 +34,13 @@ Install_varnish() echo '正在安装脚本文件...' > $install_tmp mkdir -p $serverPath/source - if [ ${OSNAME} == "macos" ]; then + if [ "${OSNAME}" == "macos" ]; then brew install varnish - elif [ ${OSNAME} == "centos" ]; then + elif [ "${OSNAME}" == "centos" ]; then yum install varnish -y - elif [ ${OSNAME} == "debian" ] || [ ${OSNAME} == "ubuntu" ]; then + elif [ "${OSNAME}" == "debian" ] || [ "${OSNAME}" == "ubuntu" ]; then apt install varnish -y - elif [ ${OSNAME} == "opensuse" ];then + elif [ "${OSNAME}" == "opensuse" ];then zypper install -y varnish else echo "I won't support it" @@ -60,13 +60,13 @@ Uninstall_varnish() cd ${rootPath} && python3 ${rootPath}/plugins/varnish/index.py stop cd ${rootPath} && python3 ${rootPath}/plugins/varnish/index.py initd_uninstall - if [ ${OSNAME} == "macos" ]; then + if [ "${OSNAME}" == "macos" ]; then brew uninstall varnish - elif [ ${OSNAME} == "centos" ]; then + elif [ "${OSNAME}" == "centos" ]; then yum remove varnish -y - elif [ ${OSNAME} == "debian" ] || [ ${OSNAME} == "ubuntu" ]; then + elif [ "${OSNAME}" == "debian" ] || [ "${OSNAME}" == "ubuntu" ]; then apt remove varnish -y - elif [ ${OSNAME} == "opensuse" ];then + elif [ "${OSNAME}" == "opensuse" ];then zypper remove -y varnish else echo "I won't support it"