summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd2013f)
raw | patch | inline | side by side (parent: fd2013f)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 Sep 2008 12:47:47 +0000 (12:47 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 Sep 2008 12:47:47 +0000 (12:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12518 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/debian/gosa-si-server.postinst | patch | blob | history |
index e20a28fc9b65671c57c5b6aa758d71cee2dfc660..0affbd763ac59466e61909cc6f5dbd4dc3a13203 100644 (file)
if [ -w /etc/gosa-si/server.conf ]; then
for i in database username password host; do
eval 'val=$'$i
- grep -E "mysql-$i" /etc/gosa-si/server.conf | grep -vE '^ *#' && sed -i "/\[server\]/,/\[/s/mysql-$i\s*=\s*\(.*\)$/mysql-$i = $val/g" /etc/gosa-si/server.conf || sed -i "
+ grep -E "mysql-$i" /etc/gosa-si/server.conf | grep -vE '^ *#' &> /dev/null && sed -i "/\[server\]/,/\[/s/mysql-$i\s*=\s*\(.*\)$/mysql-$i = $val/g" /etc/gosa-si/server.conf || sed -i "
/\[server\]/ a\
mysql-$i = $val" /etc/gosa-si/server.conf
done