Add a preinst script to check version of postgresql
This commit is contained in:
parent
d921a91c48
commit
2ed87c3567
1 changed files with 14 additions and 0 deletions
14
debian/gitlab.preinst
vendored
Normal file
14
debian/gitlab.preinst
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
pg_version=$(pg_lsclusters |grep 5432 |awk '{print $1}')
|
||||||
|
|
||||||
|
if [ "${pg_version}" -lt 12 ]; then
|
||||||
|
echo "========================================================================"
|
||||||
|
echo "Upgrade postgresql to at least version 12 before upgrading gitlab."
|
||||||
|
echo "You can use pg_upgradecluster command to upgrade the postgresql version."
|
||||||
|
echo "Aborting gitlab installation..."
|
||||||
|
echo "========================================================================"
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue