reset: add confirmation before erasing

This commit is contained in:
Thomas NOËL 2014-11-10 00:14:37 +01:00
parent 103184f347
commit 294507627b
1 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,12 @@ set -e
LDIFDIR=/usr/share/slapd-supann/
SERVICE="/usr/sbin/service slapd"
echo -n "WARNING! All current data will be erased. Are you sure? (type yes) "
read ok
if [ "x$ok" != "xyes" ]; then
exit 3
fi
${SERVICE} stop || true
BACKUPDIR=/var/backups/slapd-reset-`date +%Y%m%dT%H%M%S`