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 25.
He saw the lovely mountain and the great ocean. The Moon walked around the mountain seven times. Having walked around it, he went to where Maheshvara was.
Simple meaning: The Moon walked seven times around the hill and went to Shiva.
समीपे तु समुद्रस्य स्पर्शलिंगस्वरूपवान् ।
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.