DbServer "MySQL" { Owner __Owner__ AccessType allow ChangePassword 2012-07-23 Hostname localhost Password qXb8fMwe SockPath /var/lib/mysql/mysql.sock Type mysql User root }
re.search(r'DbServer\s"MySQL"\s+ \{ (\s+.+\n)* \}', data, re.VERBOSE))
порядок ключей может быть разным. В принципе если кому известно что за формат конфига (и какую либу юзать) тоже буду благодарен.
Вот пример большей части конфига сначала конфига:
Option NoMysqlQuota #Option DisableSecurePhpBin Option LogLevel 9 DNS named Mirror http://ru.download.ispsystem.com/ extaction mindterm /mancgi/mindterm ip 194.44.0.219 shared _ ip 194.44.0.229 shared _ PluginSource http://download.ispsystem.com/plugins/ispmgr_plugins.xml PluginSource http://usings.ru/isp_plugins/ispmgr_plugins.xml path db4 /usr/bin/db_dump -p /etc/sasldb2 path DefaultHomeDir /var/www ApacheVersion 2 Web web WebModules apache path httpd.conf /etc/httpd/conf/httpd.conf path httpd /usr/sbin/apachectl path apachectl /usr/sbin/apachectl start Service "HTTP" { Confname httpd Monitored NO Process httpd Start /etc/rc.d/init.d/httpd start Stop /etc/rc.d/init.d/httpd stop Type www } Service "FTP" { Confname proftpd Monitored NO Process proftpd Start /etc/rc.d/init.d/proftpd start Stop /etc/rc.d/init.d/proftpd stop Type ftp } Service "POP3" { Confname dovecot Monitored NO Process dovecot Start /etc/rc.d/init.d/dovecot start Stop /etc/rc.d/init.d/dovecot stop Type pop3 } Service "MySQL" { Confname mysqld Monitored NO Process mysqld Start /etc/rc.d/init.d/mysqld start Stop /etc/rc.d/init.d/mysqld stop Type mysql Ip /var/lib/mysql/mysql.sock } Service "DNS" { Confname named Monitored NO Process named Start /etc/rc.d/init.d/named start Stop /etc/rc.d/init.d/named stop Type dns } ApacheProcName httpd ApacheUid 48 ApacheGid 48 Option Agree path genericstable /etc/mail/generic path accessdb /etc/mail/access path php-configs /etc/php.d path phpbinary /usr/bin/php-cgi path php.ini /etc/php.ini path php-extensions /usr/lib64/php/modules path dovecot.passwd /etc/dovecot/dovecot.passwd path dovecotpw-bin /usr/bin/doveadm pw POP3 dovecot path iptables /etc/sysconfig/iptables DbServer "MySQL" { Owner __Owner__ AccessType allow ChangePassword 2012-07-23 Hostname localhost Password qXb8fMwe SockPath /var/lib/mysql/mysql.sock Type mysql User root } SupportCenterServer MySQL