I forgot to kill DetermineCfenginePort here.

For simplicity: this piece of code does not change CFENGINE_PORT, only cf-serverd does.