#!/bin/bash

# Set default password.
# It's really important because it will be used as "global" default password for linbox-config
if [ -f /etc/ldap.secret ]; then
  ldap_secret=`cat /etc/ldap.secret`
elif [ -f /etc/ldap-backup.secret ]; then
  ldap_secret=`cat /etc/ldap-backup.secret`
else
  exit 1
fi
sed -i "s|^\(password[[:space:]]*=[[:space:]]*\).*$|\1${ldap_secret}|" /etc/mmc/plugins/base.ini

# Create default archive path
mkdir -p /home/archives
