Ok... that channel_check.sh script could work, I would need to try it out if it also correctly handles "auto" control channel settings.
But too be honest... I am surprised, so not many people have ever wondered how Automatic Channel Selection Daemon (acsd) is doing its work? I want to know how...