Skip to content

Commit 91aa87e

Browse files
committed
Use official postgresql repository to be up to date.
Fixes hestiacp#627
1 parent 0e11b57 commit 91aa87e

File tree

4 files changed

+39
-6
lines changed

4 files changed

+39
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ All notable changes to this project will be documented in this file.
5959
- Fixed database user authentification on backup restore.
6060
- Added robots.txt for roundcube webmail to prevent search bot crawling.
6161
- Re-Enable force ssl function on let's encrypt certification renew.
62+
- Added official postgresql repository to be up to date.
6263

6364
## [1.0.6] - 2019-09-24 - Hotfix
6465
### Bugfixes

install/hst-install-debian.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,18 @@ fi
637637
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
638638
wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
639639
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key > /dev/null 2>&1
640+
rm /tmp/deb_signing.key
641+
642+
# Installing postgresql repo
643+
if [ "$postgresql" = 'yes' ]; then
644+
echo "(*) PostgreSQL"
645+
echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
646+
wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
647+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
648+
rm /tmp/psql_signing.key
649+
fi
650+
651+
# Echo for a new line
640652
echo
641653

642654
# Updating system

install/hst-install-ubuntu.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -577,20 +577,26 @@ LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php > /dev/null 2>&1
577577

578578
# Installing MariaDB repo
579579
echo "(*) MariaDB"
580-
if [ -e $apt/mariadb.list ]; then
581-
rm $apt/mariadb.list
582-
fi
583580
echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/10.4/$VERSION $codename main" > $apt/mariadb.list
584581
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
585582

586583
# Installing hestia repo
587584
echo "(*) Hestia Control Panel"
588-
if [ -e $apt/hestia.list ]; then
589-
rm $apt/hestia.list
590-
fi
591585
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
592586
wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
593587
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key > /dev/null 2>&1
588+
rm /tmp/deb_signing.key
589+
590+
# Installing postgresql repo
591+
if [ "$postgresql" = 'yes' ]; then
592+
echo "(*) PostgreSQL"
593+
echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
594+
wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
595+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
596+
rm /tmp/psql_signing.key
597+
fi
598+
599+
# Echo for a new line
594600
echo
595601

596602
# Updating system

install/upgrade/versions/latest.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,17 @@ if [ -e "/var/lib/roundcube/" ]; then
127127
echo "Disallow: /" >> /var/lib/roundcube/robots.txt
128128
fi
129129
fi
130+
131+
# Installing postgresql repo
132+
if [ -e "/etc/postgresql" ]; then
133+
osname="$(cat /etc/os-release | grep "^ID\=" | sed "s/ID\=//g")"
134+
if [ "$osname" = "ubuntu" ]; then
135+
codename="$(lsb_release -s -c)"
136+
else
137+
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
138+
fi
139+
echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > /etc/apt/sources.list.d/postgresql.list
140+
wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
141+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
142+
rm /tmp/psql_signing.key
143+
fi

0 commit comments

Comments
 (0)