2022-03-06 10:59:23 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ "$*" != "" ]; then
|
|
|
|
exec $@
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Starting Sahana Eden..."
|
|
|
|
|
2022-03-06 14:43:47 +01:00
|
|
|
# Create admin user CSV template
|
|
|
|
cat <<EOF >/srv/web2py/applications/eden/modules/templates/default/users/masterUsers.csv
|
|
|
|
First Name,Last Name,Email,Password,Role,Organisation
|
|
|
|
Admin,User,${SAHANA_ADMIN_USER},${SAHANA_ADMIN_PASSWORD},ADMIN,
|
|
|
|
EOF
|
|
|
|
unset SAHANA_ADMIN_USER
|
|
|
|
unset SAHANA_ADMIN_PASSWORD
|
|
|
|
|
|
|
|
# Populate or upgrade database
|
2022-03-06 10:59:23 +01:00
|
|
|
/usr/local/bin/migrate norestart
|
|
|
|
|
|
|
|
# Exec into s6 supervisor
|
|
|
|
exec /bin/s6-svscan /etc/services.d
|