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

Use official postgresql repository to be up to date.
Fixes #627

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

+ 1 - 0
CHANGELOG.md

@@ -59,6 +59,7 @@ All notable changes to this project will be documented in this file.
 - Fixed database user authentification on backup restore.
 - Added robots.txt for roundcube webmail to prevent search bot crawling.
 - Re-Enable force ssl function on let's encrypt certification renew.
+- Added official postgresql repository to be up to date.
 
 ## [1.0.6] - 2019-09-24 - Hotfix
 ### Bugfixes

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

@@ -637,6 +637,18 @@ fi
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key > /dev/null 2>&1
+rm /tmp/deb_signing.key
+
+# Installing postgresql repo
+if [ "$postgresql" = 'yes' ]; then
+    echo "(*) PostgreSQL"
+    echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
+    wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
+    APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
+    rm /tmp/psql_signing.key
+fi
+
+# Echo for a new line
 echo
 
 # Updating system

+ 12 - 6
install/hst-install-ubuntu.sh

@@ -577,20 +577,26 @@ LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
 
 # Installing MariaDB repo
 echo "(*) MariaDB"
-if [ -e $apt/mariadb.list ]; then
-    rm $apt/mariadb.list
-fi
 echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/$VERSION $codename main" > $apt/mariadb.list
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
 
 # Installing hestia repo
 echo "(*) Hestia Control Panel"
-if [ -e $apt/hestia.list ]; then
-    rm $apt/hestia.list
-fi
 echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
 wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key > /dev/null 2>&1
+rm /tmp/deb_signing.key
+
+# Installing postgresql repo
+if [ "$postgresql" = 'yes' ]; then
+    echo "(*) PostgreSQL"
+    echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
+    wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
+    APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
+    rm /tmp/psql_signing.key
+fi
+
+# Echo for a new line
 echo
 
 # Updating system

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

@@ -127,3 +127,17 @@ if [ -e "/var/lib/roundcube/" ]; then
         echo "Disallow: /" >> /var/lib/roundcube/robots.txt
     fi
 fi
+
+# Installing postgresql repo
+if [ -e "/etc/postgresql" ]; then
+    osname="$(cat /etc/os-release | grep "^ID\=" | sed "s/ID\=//g")"
+    if [ "$osname" = "ubuntu" ]; then
+        codename="$(lsb_release -s -c)"
+    else
+        codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
+    fi
+    echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > /etc/apt/sources.list.d/postgresql.list
+    wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
+    APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
+    rm /tmp/psql_signing.key
+fi