14 lines
374 B
Smarty
14 lines
374 B
Smarty
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
echo "Create tables if needed"
|
|
psql -f /usr/share/lemonldap-ng/ressources/lemonldap-ng.postgres.sql
|
|
|
|
if [ "$(psql -qAtc 'SELECT COUNT(1) FROM lmConfig')" = "0" ]; then
|
|
echo "Load initial configuration in database"
|
|
/usr/libexec/lemonldap-ng/bin/convertConfig \
|
|
--current=/local/init.ini \
|
|
--new=/etc/lemonldap-ng/lemonldap-ng.ini
|
|
fi
|