Purana Jyotisha Sangraha · by Vyasa
Chapter 12 · Prabhasa and the Planet Lingas
स्कन्दपुराणम् : प्रभासक्षेत्रे ग्रहलिङ्गानि
समीपे तु समुद्रस्य स्पर्शलिंगस्वरूपवान् ।प्रसादयामास विभुं प्रसन्नेनांतरात्मना ॥ २६ ॥
From the Skanda Purana, print Prabhasa Khanda (Prabhasa-kshetra-mahatmya) ch 22, verse 26.
Near the sea, Shiva was present in the form of the Sparsha linga. The Moon pleased the Lord with a glad heart.
Simple meaning: Near the sea the Moon pleased Shiva with a glad heart.
मरणं वेति संध्याय शरणं वा महेश्वरम् ।
The Moon decided to seek Shiva's shelter, wanting freedom from the curse or an end.
इति सोमो मतिं कृत्वा तपसाऽऽराधयञ्छिवम् ।
The Moon did hard austerity for a thousand years, living on fruits and roots.
पूर्णे वर्षसहस्रे तु चतुर्थे वरवर्णिनि ।
After four thousand years Shiva was pleased and spoke to the Moon.