[Piuparts-commits] [piuparts] 15/23: recognize postgres running on non-default port

Holger Levsen holger at layer-acht.org
Tue Jan 17 12:39:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit dfb1974e68350b42898a126c02c68cd6f7f3d33e
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Jan 16 12:49:50 2017 +0100

    recognize postgres running on non-default port
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 custom-scripts/scripts/post_install_exceptions     | 10 ++++++++++
 custom-scripts/scripts/pre_install_database-server | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/custom-scripts/scripts/post_install_exceptions b/custom-scripts/scripts/post_install_exceptions
index 58a6b64..ecfaa46 100755
--- a/custom-scripts/scripts/post_install_exceptions
+++ b/custom-scripts/scripts/post_install_exceptions
@@ -34,3 +34,13 @@ if is_installed dkms; then
 	# leftover 'sleep' process from progress reporting
 	sleep 3
 fi
+
+for pgconf in /etc/postgresql/*/main/postgresql.conf
+do
+	test -f "$pgconf" && test -r "$pgconf" || continue
+	port=$(awk '/^port/ { print $3 }' "$pgconf")
+	if [ "-n" $port ] && [ "$port" != "5432" ]
+	then
+		echo "Non-default port in $pgconf"
+	fi
+done
diff --git a/custom-scripts/scripts/pre_install_database-server b/custom-scripts/scripts/pre_install_database-server
index 163a70a..8b3ec01 100755
--- a/custom-scripts/scripts/pre_install_database-server
+++ b/custom-scripts/scripts/pre_install_database-server
@@ -221,4 +221,14 @@ if [ -n "$INSTALL" ]; then
 	apt-get -y install $INSTALL
 fi
 
+for pgconf in /etc/postgresql/*/main/postgresql.conf
+do
+	test -f "$pgconf" && test -r "$pgconf" || continue
+	port=$(awk '/^port/ { print $3 }' "$pgconf")
+	if [ "-n" $port ] && [ "$port" != "5432" ]
+	then
+		echo "Non-default port in $pgconf"
+	fi
+done
+
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list