This paper addresses issues arising in the online adaptation of PID controller parameters. Employing a frequency loop shaping approach to define the control objective, it is possible to adapt the PID parameters directly with standard least squares algorithms. In addition to this, the use of filter-banks in the regressor leads to the approximate minimization of the H-infinity norm of the error operator. The practical implication of this observation is that PIDs can be reliably tuned, even in cases of large mismatch between the target and the feasible loop shapes. Numerical examples are included, illustrating the properties and the implementation of the algorithm.