Преглед на файлове

[167478] setup script needs to check the DS instance
if the instance dir exists, run ns-config with "-r".

Noriko Hosoi преди 20 години
родител
ревизия
85ac7b3aa1
променени са 1 файла, в които са добавени 12 реда и са изтрити 1 реда
  1. 12 1
      ldap/cm/newinst/setup

+ 12 - 1
ldap/cm/newinst/setup

@@ -248,9 +248,20 @@ if ! [ $silent ]; then
 	echo "SuiteSpotGroup = $group" >> $inffile
 	echo ServerRoot = `pwd` >> $inffile
 
+	# check if ds instance directory exists or not
+	# if it does, run ns-config with the reconfigure option
+	doreconfig=""
+	for x in `ls -d slapd-*`
+	do
+		if [ -d $x ]; then
+			doreconfig="-r"
+			break
+		fi
+	done
+
 	# first, run ds
 	cd bin/slapd/admin/bin
-	./ns-config -f $inffile -l $logfile -m $installmode || doExit
+	./ns-config -f $inffile -l $logfile -m $installmode $doreconfig || doExit
 	cd ../../../..
 
 	# next, run admin