I am not sure, on your description of your symptoms that it is pneumonia, but that is just a gut feeling, as it sounds more like a viral chronic bronchitis.
The pain that you describe will have nothing to do with your liver and is probably muscular due to coughing.
I am surprised that you were not given any mucolytic (mucous easing) inhalation, but that is what you need and can only be given by a prescription.
You can try inhaling steam from hot water, beneath a towel over your head , but if it hasn't eased in 24 hours, contact your GP , explain the mucous problem and get a prescription.