1
0
Fork 0
scripts/sysadmin/purge_old_ldap.sh

14 lines
212 B
Bash

#!/bin/bash
set -e
set -o errexit
set -o nounset
INSTANCE=$1
find "/var/lib/dirsrv/slapd-${INSTANCE}/bak/" \
-maxdepth 1 \
-type d \
-name "${INSTANCE}"-\* \
-mtime +7 \
-exec rm -rf {} \;