Section 8(1)

8. Security for abstaining from commission of offences.—(1) Whenever any person is convicted of an offence punishable under section 5 or under section 6, and the Court convicting him is of opinion that it is necessary to require such person to execute a bond for abstaining from the commission of such offence, the Court, may, at the time of passing sentence on such person, order him to execute a bond for a sum proportionate to his means, with or without sureties, for abstaining from the commission of such offence during such period, not exceeding three years, as it thinks fit to fix.