cat $OLDCFG|grep -v setAdminGroups|grep -v setLog|grep -v @package > $NEWCFG
# convert admin groups to group privileges
-ADMGROUPS=$(grep setAdminGroups $OLDCFG|sed -e 's/,//g' -e "s/.*array[^(]*(\([^)]*\)).*/\1/" -e "s/[\"\']//g")
+ADMGROUPS=$(grep setAdminGroups $OLDCFG|sed -e 's/,//g' -e "s/.*array[^(]*(\([^)]*\)).*/\1/" -e "s/[\"\']/ /g")
for i in $ADMGROUPS; do
psql -c "INSERT INTO privileges_assign (act,privilege) VALUES('$i','mod_errorreporter_admin');" > /dev/null || exit 1;
echo "added adminship for group '$i'"