Germany will only continue to provide security support to Afghanistan if the influx of refugees from the nation ceases, the countrys interior minister said.