add numbrows to commands and files for BNoiZe's template magic; added possibility to use sql-data inside xml-config; updates xml-configs a bit when socket is used (not 100% done)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -2913,6 +2913,11 @@ socket /var/run/mysqld/mysqld.sock
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<command>
|
||||
<!-- if a socket is set for the db-server use it -->
|
||||
<visibility mode="notempty">{{sql.socket}}</visibility>
|
||||
<content><![CDATA[sed -i.bak \'s|^\\(socket\\).*$|\\1\\"{{sql.socket}}\\"|\' /etc/libnss-mysql.cfg]]></content>
|
||||
</command>
|
||||
<file name="/etc/libnss-mysql-root.cfg" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
<content><![CDATA[
|
||||
|
||||
@@ -2350,6 +2350,12 @@ password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<commands>
|
||||
<!-- if a socket is set for the db-server use it -->
|
||||
<visibility mode="notempty">{{sql.socket}}</visibility>
|
||||
<command><![CDATA[sed -i.bak \'s/^#socket/socket/\' /etc/libnss-mysql.cfg]]></command>
|
||||
<command><![CDATA[sed -i.bak \'s|^\\(socket\\).*$|\\1\\"{{sql.socket}}\\"|\' /etc/libnss-mysql.cfg]]></command>
|
||||
</commands>
|
||||
<file name="/etc/libnss-mysql-root.cfg" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
<content><![CDATA[
|
||||
|
||||
@@ -1455,6 +1455,11 @@ socket /var/run/mysqld/mysqld.sock
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<command>
|
||||
<!-- if a socket is set for the db-server use it -->
|
||||
<visibility mode="notempty">{{sql.socket}}</visibility>
|
||||
<content><![CDATA[sed -i.bak \'s|^\\(socket\\).*$|\\1\\"{{sql.socket}}\\"|\' /etc/libnss-mysql.cfg]]></content>
|
||||
</command>
|
||||
<file name="/etc/libnss-mysql-root.cfg" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
<content><![CDATA[
|
||||
|
||||
@@ -4807,9 +4807,17 @@ database <SQL_DB>
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
port 3306
|
||||
#socket /var/run/mysqld/mysqld.sock
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<commands>
|
||||
<!-- if a socket is set for the db-server use it -->
|
||||
<visibility mode="notempty">{{sql.socket}}</visibility>
|
||||
<command><![CDATA[sed -i.bak \'s/^port/#port/\' /etc/libnss-mysql.cfg]]></command>
|
||||
<command><![CDATA[sed -i.bak \'s/^#socket/socket/\' /etc/libnss-mysql.cfg]]></command>
|
||||
<command><![CDATA[sed -i.bak \'s|^\\(socket\\).*$|\\1\\"{{sql.socket}}\\"|\' /etc/libnss-mysql.cfg]]></command>
|
||||
</commands>
|
||||
<file name="/etc/libnss-mysql-root.cfg" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
<content><![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user