Skip to content

Commit f0043f2

Browse files
committed
Update install.sh
1 parent a9b5073 commit f0043f2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

install.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ echo "La position determinera l'ordre d'execution des backends (comme dans init.
44
read -p "Numero de demarrage du module (2 positions):" NUM
55
echo "installation dans backends/${NUM}openldap"
66
INSTALL=../../backends/${NUM}openldap
7-
if [ -d ../../backends/${NUM}openldap ];then
8-
echo "Repertoire deja existant choisissez un autre numéro"
9-
exit 1
10-
else
11-
mkdir ../../backends/${NUM}openldap
7+
BACKEND=openldap
8+
if [ -d ../../backends/${NUM}${BACKEND} ];then
9+
read -p "Repertoire déjà existant voulez vous l'écraser ? (O/N)" -i "N" REPONSE
10+
if [ "$REPONSE" = "O" ];then
11+
rm -rf ../../backends/${NUM}${BACKEND}
12+
else
13+
exit 1
14+
fi
1215
fi
16+
mkdir ../../backends/${NUM}${BACKEND}
1317
echo "Copie des fichiers dans ${INSTALL}"
1418
mkdir $INSTALL/etc
1519
cp ./etc/* $INSTALL/etc

0 commit comments

Comments
 (0)