mirror of
https://github.com/EngineGPDev/Autoinstall.git
synced 2025-01-18 13:52:22 +03:00
Added checking for php, apache, nginx repositories for ubuntu
This commit is contained in:
parent
9593d4af15
commit
beede7e7dd
22
install.sh
22
install.sh
@ -162,6 +162,7 @@ while true; do
|
||||
defPHP=$(apt-cache policy php | awk -F ': ' '/Candidate:/ {split($2, a, "[:+~]"); print a[2]}')
|
||||
fi
|
||||
else
|
||||
if [ ! -f "/etc/apt/sources.list.d/ondrej-ubuntu-php-*.list" ]; then
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
echo "Репозиторий php не обнаружен. Добавляем..." | tee -a $logsINST
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
@ -175,6 +176,7 @@ while true; do
|
||||
# Определяем версию php по умолчанию
|
||||
defPHP=$(apt-cache policy php | awk -F ': ' '/Candidate:/ {split($2, a, "[:+~]"); print a[2]}')
|
||||
fi
|
||||
fi
|
||||
|
||||
# Проверяем наличие репозитория apache2 sury
|
||||
if [[ " ${disOS} " =~ " Debian " ]]; then
|
||||
@ -190,6 +192,7 @@ while true; do
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
else
|
||||
if [ ! -f "/etc/apt/sources.list.d/ondrej-ubuntu-apache2-*.list" ]; then
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
echo "Репозиторий apache2 не обнаружен. Добавляем..." | tee -a $logsINST
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
@ -197,8 +200,9 @@ while true; do
|
||||
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/apache2 -y >> $logsINST 2>&1
|
||||
|
||||
# Обновление таблиц и пакетов
|
||||
apt-get -y update >> $logsINST 2>&1
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
sudo apt-get -y update >> $logsINST 2>&1
|
||||
sudo apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Проверяем наличие репозитория nginx sury
|
||||
@ -215,6 +219,7 @@ while true; do
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
else
|
||||
if [ ! -f "/etc/apt/sources.list.d/ondrej-ubuntu-nginx-*.list" ]; then
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
echo "Репозиторий nginx не обнаружен. Добавляем..." | tee -a $logsINST
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
@ -225,6 +230,7 @@ while true; do
|
||||
apt-get -y update >> $logsINST 2>&1
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Список пакетов для установки
|
||||
pkgsLIST=(php$verPHP-fpm php$verPHP-common php$verPHP-cli php$verPHP-memcache php$verPHP-mysql php$verPHP-xml php$verPHP-mbstring php$verPHP-gd php$verPHP-imagick php$verPHP-zip php$verPHP-curl php$verPHP-ssh2 apache2 libapache2-mod-fcgid nginx ufw memcached screen cron)
|
||||
@ -613,15 +619,17 @@ EOF
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
else
|
||||
if [ ! -f "/etc/apt/sources.list.d/ondrej-ubuntu-apache2-*.list" ]; then
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
echo "Репозиторий apache2 не обнаружен. Добавляем..." | tee -a $logsINST
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
# Добавляем репозиторий apache2
|
||||
sudo add-apt-repository ppa:ondrej/apache2 -y >> $logsINST 2>&1
|
||||
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/apache2 -y >> $logsINST 2>&1
|
||||
|
||||
# Обновление таблиц и пакетов
|
||||
apt-get -y update >> $logsINST 2>&1
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
sudo apt-get -y update >> $logsINST 2>&1
|
||||
sudo apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Проверяем наличие репозитория nginx sury
|
||||
@ -638,16 +646,18 @@ EOF
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
else
|
||||
if [ ! -f "/etc/apt/sources.list.d/ondrej-ubuntu-nginx-*.list" ]; then
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
echo "Репозиторий nginx не обнаружен. Добавляем..." | tee -a $logsINST
|
||||
echo "===================================" >> $logsINST 2>&1
|
||||
# Добавляем репозиторий nginx
|
||||
sudo add-apt-repository ppa:ondrej/nginx -y >> $logsINST 2>&1
|
||||
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/nginx -y >> $logsINST 2>&1
|
||||
|
||||
# Обновление таблиц и пакетов
|
||||
apt-get -y update >> $logsINST 2>&1
|
||||
apt-get -y upgrade >> $logsINST 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
pkgsLOC=(glibc-source lib32z1 libbabeltrace1 libc6-dbg libdw1 lib32stdc++6 libreadline8 lib32gcc-s1 screen tcpdump lsof qstat gdb-minimal ntpdate gcc-multilib iptables default-jdk nginx)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user