From 12bd7dd39441c74d499f8b7a6a2d705e98d41d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E6=AD=8C-=E5=85=B1=E7=A9=B7=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=A4=A7=E4=B8=AD=E5=8D=8E=E5=8C=BACFO?= <47450409+dysf888@users.noreply.github.com> Date: Sat, 10 Dec 2022 12:16:51 +0800 Subject: [PATCH] Better support for archlinux --- script/install_en.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/script/install_en.sh b/script/install_en.sh index dcf79af..e7e74fc 100755 --- a/script/install_en.sh +++ b/script/install_en.sh @@ -2,7 +2,7 @@ #======================================================== # System Required: CentOS 7+ / Debian 8+ / Ubuntu 16+ / Alpine 3+ / -# Arch not tested +# Arch only tested once. Screenshot Feedback dysf888@pm.me # Description: Nezha Monitoring Install Script # Github: https://github.com/naiba/nezha #======================================================== @@ -96,10 +96,9 @@ install_base() { } install_soft() { - # The official Arch library does not contain selinux components - (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) || + (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) || (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) || - (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || + (command -v pacman >/dev/null 2>&1 && pacman -Syu $* yay --noconfirm) && echo -e "${red}Tips: ${plain} When the input box appears, please enter nezha and press Enter ${red}!!!three times in total!!!${plain}\n" && useradd -m nezha && passwd nezha && [[ $(egrep "^[^#]*nezha.*ALL)" /etc/sudoers) ]] || sed -i "$ a\nezha ALL=(ALL) ALL" /etc/sudoers && (command -v yay >/dev/null 2>&1 && sudo -iu nezha yay -S libselinux --noconfirm) && pkill -u nezha && userdel nezha && echo -e "${red}Tips: ${plain}User nezha has been deleted\n"|| (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y) || (command -v apk >/dev/null 2>&1 && apk update && apk add $* -f) }