aboutsummaryrefslogtreecommitdiffstats
path: root/main/pgpool/pgpool.post-upgrade
blob: fc3e9a206d1f91b9ece30c789b1739e9b5c72ee9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

ver_new="$1"
ver_old="$2"

if [ "$(apk version -t "$ver_old" "4.1.0-r0")" = "<" ]; then
	cat >&2 <<-EOF
		*
		* The pgpool's configuration files were moved from /etc to /etc/pgpool.
		* Files /etc/pgpool.conf, /etc/pcp.conf and /etc/pg_hba.conf will be
		* automatically moved to the new location, if exists. However, you should
		* still check your configuration; pay attention to relative paths!
		*
	EOF

	for f in pgpool.conf pcp.conf pg_hba.conf; do
		if [ -f /etc/$f ] && ! [ -f /etc/pgpool/$f.apk-new ]; then
			mv -v /etc/$f /etc/pgpool/
		fi
	done
fi

exit 0