Revert "Merge pull request #263 from dysf888/patch-1 [no ci]"

This reverts commit 405f852c7dbb5de9a1f9297201991870eb03007c, reversing
changes made to 2f7fd589bf36e0ef491aa03fcd700b5dda4c4dac.
This commit is contained in:
naiba 2022-12-11 14:57:09 +08:00
parent c58af25414
commit e0618bacb5

View File

@ -2,7 +2,7 @@
#======================================================== #========================================================
# System Required: CentOS 7+ / Debian 8+ / Ubuntu 16+ / Alpine 3+ / # System Required: CentOS 7+ / Debian 8+ / Ubuntu 16+ / Alpine 3+ /
# Arch only tested once. Screenshot Feedback dysf888@pm.me # Arch not tested
# Description: Nezha Monitoring Install Script # Description: Nezha Monitoring Install Script
# Github: https://github.com/naiba/nezha # Github: https://github.com/naiba/nezha
#======================================================== #========================================================
@ -96,9 +96,10 @@ install_base() {
} }
install_soft() { 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 apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) ||
(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 pacman >/dev/null 2>&1 && pacman -Syu $*) ||
(command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y) || (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) (command -v apk >/dev/null 2>&1 && apk update && apk add $* -f)
} }