Commit 0779acb3 authored by Johannes Zellner's avatar Johannes Zellner

Fix the ldap insert statement

parent e3ae8a34
......@@ -70,7 +70,7 @@ if [[ -n "${LDAP_SERVER:-}" ]]; then
for key in ${ldap_keys[@]}; do
if [[ -z `$mysql -e "SELECT * FROM lime_plugin_settings WHERE plugin_id=${LDAP_PLUGIN_ID} AND lime_plugin_settings.key='${key}';"` ]]; then
echo " ==> Insert new ldap config ${key} = ${ldap_values[$key]}"
$mysql -e "INSERT INTO lime_plugin_settings (plugin_id, lime_plugin_settings.key, value) VALUES (${LDAP_PLUGIN_ID}, '${key}', ${ldap_values[$key]}) WHERE plugin_id=${LDAP_PLUGIN_ID} AND lime_plugin_settings.key='${key}';"
$mysql -e "INSERT INTO lime_plugin_settings (plugin_id, lime_plugin_settings.key, value) VALUES (${LDAP_PLUGIN_ID}, '${key}', ${ldap_values[$key]});"
else
echo " ==> Update ldap config ${key} = ${ldap_values[$key]}"
$mysql -e "UPDATE lime_plugin_settings SET value=${ldap_values[$key]} WHERE plugin_id=${LDAP_PLUGIN_ID} AND lime_plugin_settings.key='${key}';"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment