public static function loadCmdLineArgs($settings)
    {
        $error = false;

        static $ktr = [
            '-' => '',
        ];

        foreach ($settings as $k => $v) {
            $k = strtolower(strtr($k, $ktr));

            if ($k === 'config') {
                $k = 'configfile';
            }

            if (($k === 'user') || ($k === 'group')) {
                if ($v === '') {
                    $v = null;
                }
            }
            if (isset(Daemon::$config->{$k})) {
                Daemon::$config->{$k}->setHumanValue($v);
                Daemon::$config->{$k}->source = 'cmdline';
            } else {
                Daemon::log('Unrecognized parameter \'' . $k . '\'');
                $error = true;
            }
        }

        return !$error;
    }