init_slapd.sh

来自「samba最新软件」· Shell 代码 · 共 42 行

SH
42
字号
#!/bin/sh if [ -z "$LDBDIR" ]; then    LDBDIR=`dirname $0`/..    export LDBDIRfirm -rf tests/tmp/dbmkdir -p tests/tmp/dbif [ -f tests/tmp/slapd.pid ]; then    kill `cat tests/tmp/slapd.pid`    sleep 1fiif [ -f tests/tmp/slapd.pid ]; then    kill -9 `cat tests/tmp/slapd.pid`    rm -f tests/tmp/slapd.pidfi# we don't consider a slapadd failure as a test suite failure, as it# has nothing to do with ldbMODCONF=tests/tmp/modules.confrm -f $MODCONFtouch $MODCONF || exit 1slaptest -u -f $LDBDIR/tests/slapd.conf > /dev/null 2>&1 || { echo "enabling sladp modules"cat > $MODCONF <<EOFmodulepath	/usr/lib/ldapmoduleload	back_bdbEOF}slaptest -u -f $LDBDIR/tests/slapd.conf || {    echo "slaptest failed - skipping ldap tests"    exit 0}slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?