canaille-globuzma/demo/run.sh

28 lines
847 B
Bash
Raw Normal View History

#!/bin/bash
2020-11-13 10:15:17 +00:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
2023-03-11 23:13:09 +00:00
if ! type slapd > /dev/null 2>&1; then
echo "Cannot start the LDAP server. Please install OpenLDAP on your system"
echo "or run the demo with docker-compose."
return 1
fi
2023-03-11 23:13:09 +00:00
if ! type python > /dev/null 2>&1 && ! type python3 > /dev/null 2>&1; then
echo "Cannot start the LDAP server. Please install python on your system"
echo "or run the demo with docker-compose."
return 1
fi
2023-03-11 23:13:09 +00:00
if ! type poetry > /dev/null 2>&1; then
echo "Cannot start the LDAP server. Please install poetry on your system"
echo "or run the demo with docker-compose."
echo "https://python-poetry.org/docs/#installation"
return 1
fi
2023-03-11 23:13:09 +00:00
poetry install --with demo --without dev
pushd "$DIR" > /dev/null 2>&1 || exit
env poetry run honcho start
popd || exit