Car is a 1999 2.0Hdi. Recently it totally failed to restart after a shopping trip - to buy a loaf of bread

- local Citroen garage dragged it 200 metres to their premises and diagnosed the intank pump to be faulty, then gave me an estimate of around €800 to replace it. As the car is only worth about half of that, I declined. The owner of the garage managed to get it going again, but suggested I needed to replace the pump. After doing some research on the internet I decided to fit an exterior one on the basis that if it conked out again it would be much easier to replace. Fitted pump, fired it up, and it went fine for a few days. Car ran fine on the way to a house about 18 km away, but on the way back it went into 'limp home mode' and would not rev. I noticed a small leak from the outlet side of the pump, fixed that and road tested again. Fine on the way out, stopped the car, restarted, back to limp home mode......
Rechecked all the connections - fuel and electrical - now it will run for about 30 seconds then the pump shuts off. The yellow engine management light is on.
Any suggestions as to what to do with it (apart from blow it up!!).
Thanks in advance for any help.
1991 BX Millesme Diesel, 1999 Citroen Saxo diesel, 1985 Visa Cabriolet, Citroen C15 pickup,1991 Hymer B534 camper with Peugeot J5 power, 1999 Isuzu Trooper, loads of mopeds!