inna li’llāhi íbādan fuţanā
ţallaqu’d dunya wa khāfu’l fitanā
nažaru fīhā falammā álimū
annahā laysat li ĥayyin waţanā
jaálūhā lujjatan wa’t-takhadhū
şāliha’l aámāli fīhā sufunā

Truly there are bondsmen of Allah who are very wise
They have renounced the world, fearing fitna [temptation, turmoil]
They have looked long at it, and they have realized
That this is no place for the living to dwell
They have abandoned the world [and its pleasures] at the shore,
And have sailed away in ships carved of good deeds.

In the preface of An-Nawawi’s Riyāđu’s Şāliĥīn and usually attributed to Imām Shāfiýī.