#!/bin/sh

if dpkg -s qgis-plugin-grass >/dev/null 2>&1; then
	if [ "$LD_LIBRARY_PATH" = "" ]; then
		LD_LIBRARY_PATH=/usr/lib/grass82/lib
	else
		LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/grass82/lib
	fi
fi

export LD_LIBRARY_PATH

if [ -r /etc/default/qgis ]; then
	. /etc/default/qgis
fi

exec $0.bin $QGIS_OPTS "$@"
