Просмотр исходного кода

Use sury repository for apache2 packages.

Raphael Schneeberger 5 лет назад
Родитель
Сommit
77f177520c
4 измененных файлов с 29 добавлено и 0 удалено
  1. 1 0
      CHANGELOG.md
  2. 6 0
      install/hst-install-debian.sh
  3. 4 0
      install/hst-install-ubuntu.sh
  4. 18 0
      install/upgrade/versions/latest.sh

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
 ### Bugfixes
 - Disable Apache2 Server Status Module by default.
 - Do not allow to change the password of a non-hestia user. Thanks to Alexandre Zanni!
+- Use sury repository for apache2 packages.
 
 ## [1.1.1] - 2020-03-24 - Hotfix
 ### Features

+ 6 - 0
install/hst-install-debian.sh

@@ -607,6 +607,12 @@ echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
 wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key > /dev/null 2>&1
 
+# Installing sury apache2 repo
+echo "(*) Apache2"
+echo "deb https://packages.sury.org/apache2/ $codename main" > $apt/apache2.list
+wget --quiet https://packages.sury.org/apache2/apt.gpg -O /tmp/apache2_signing.key
+APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/apache2_signing.key > /dev/null 2>&1
+
 # Installing MariaDB repo
 echo "(*) MariaDB"
 echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list

+ 4 - 0
install/hst-install-ubuntu.sh

@@ -572,6 +572,10 @@ APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key > /dev
 echo "(*) PHP"
 LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
 
+# Installing sury apache2 repo
+echo "(*) Apache2"
+echo "deb http://ppa.launchpad.net/ondrej/apache2/ubuntu $codename main" > $apt/apache2.list
+
 # Installing MariaDB repo
 echo "(*) MariaDB"
 echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list

+ 18 - 0
install/upgrade/versions/latest.sh

@@ -9,4 +9,22 @@
 if [ -e "/etc/apache2/mods-enabled/status.conf" ]; then
     echo "(*) Disable Apache2 Server Status Module..."
     a2dismod status > /dev/null 2>&1
+fi
+
+# Add sury apache2 repository
+if [ "$WEB_SYSTEM" = "apache2" ] && [ ! -e "/etc/apt/sources.list.d/apache2.list" ]; then
+    echo "(*) Install sury.org Apache2 repository..."
+
+    # Check OS and install related repository
+    if [ -e "/etc/os-release" ]; then
+        type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
+        if [ "$type" = "ubuntu" ]; then
+            codename="$(lsb_release -s -c)"
+            echo "deb http://ppa.launchpad.net/ondrej/apache2/ubuntu $codename main" > /etc/apt/sources.list.d/apache2.list
+        elseif [ "$type" = "debian" ]; then
+            echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/apache2.list
+            wget --quiet https://packages.sury.org/apache2/apt.gpg -O /tmp/apache2_signing.key
+            APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/apache2_signing.key > /dev/null 2>&1
+        fi
+    fi
 fi