linuxtool/Config/Web/nginx/test.sh

17 lines
415 B
Bash
Raw Permalink Normal View History

2024-09-27 14:22:23 +08:00
#!/bin/bash
if ! command -v nginx &> /dev/null; then
if [[ -f "/usr/bin/apt-get" ]];then
apt-get update -y
apt-get install nginx -y
elif [[ -f "/usr/bin/apt" ]];then
apt update -y
apt install nginx -y
elif [[ -f "/usr/bin/pacman" ]];then
pacman -Syu --noconfirm
pacman -Sy --noconfirm nginx
else
echo "nginx未安装请手动安装"
2024-09-27 14:22:23 +08:00
exit
fi
fi