Sirach 49:3

KJV(i) 3 He directed his heart unto the Lord, and in the time of the ungodly he established the worship of God.