#!/bin/sh

ver_old="$2"

if [ "$(apk version -t "$ver_old" '1.0.0-r0')" = '<' ] && [ -f /etc/garage.toml ]; then
	cat >&2 <<-EOF
	*
	* Configuration file /etc/garage.toml was moved to /etc/garage/garage.toml.
	*
	EOF
	# We've already copied it to /etc/garage/garage.toml in the pre-upgrade script.
	rm -f /etc/garage.toml
fi

exit 0
