#!/bin/sh prefix="{{DS-ROOT}}" if [ "$prefix" = "/" ] ; then prefix="" fi LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ if [ -n "$prefix" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" fi export LD_LIBRARY_PATH SHLIB_PATH=$LD_LIBRARY_PATH export SHLIB_PATH cd {{SERVERBIN-DIR}} if [ $# -eq 0 ] then bak_dir={{BAK-DIR}}/reindex_`date +%Y_%m_%d_%H_%M_%S` ./ns-slapd upgradedb -D {{CONFIG-DIR}} -f -a "$bak_dir" elif [ $# -lt 4 ] then echo "Usage: db2index [-n backend_instance | {-s includesuffix}* -t attribute[:indextypes[:matchingrules]] -T vlvattribute]" exit 1 else ./ns-slapd db2index -D {{CONFIG-DIR}} "$@" fi