ib-{ats,apache,nginx}: Reworked handling of pre commands