case "$ACTION" in
	post)
		if [ "$UPDATE" = "yes" ] ; then
			:
		else
			# This sets the secret key which would otherwise be
			# distributed as a static packaged value
			secret="$(tr -dc '[:alnum:]' < /dev/urandom | head -c32)"
			sed -i "s!<SECRET_KEY>!$secret!" etc/gitea.conf
		fi
		chown _gitea:_gitea etc/gitea.conf
		;;
esac
