A historic pub which residents feared could be turned into housing will return to serving pints after a £120,000 upgrade.