The Wisdom of Jesus the Son of Sirach, or Ecclesiasticus

Chapter 49
1He set his heart right toward the Lord. In lawless days, he made godliness prevail.