A man has been spared jail for making a series of threatening phone calls to a Dublin pub, saying the owner should “watch his back”.