One man fighting against nazis

I remember that I saw this movie on TV in early 80’s. So, it might be from 60’s or 70’s. This is a kind of war movie but I think it fits better in ‘thriller’ genre.

Description of the movie:
In the World War II a small group of nazis occupy an old monastery (or castle) probably somewhere in France. The occupation is peaceful but there is one man (a monk or a priest?) who starts to fight back. He knows all the secret passages etc. in the building and starts to make different types of traps/ambushes to kill nazis silently one by one.

What I can remember:
All the scenes happened in that building. The building, castle or monastery, was build on top of the hill and it was full of secret passages/doors. For example there was a deep well and one of the passages lead to bottom of that well just above the water level.

The main character was wearing a robe (like monks have) and he had very thick glasses. He didn’t have any own weapons in the beginning and he had to improvise with different types of tools etc. he found. At some point he found an old shotgun with couple of slugs.

At the end of the movie he has killed all the nazis or nazis was just about to get him but allied forces arrived just in time to rescue. I can’t remember for sure…

“The rest of the movie is pure vengeance, mixed with flashbacks of his loss, while he methodically takes down each soldier one by one, using hidden passages, secret rooms to hide in and, at one point, uses his old rifle. The Nazis ruthlessly pursue him only to be foiled at a disadvantage of not knowing their surroundings.”