21 lines
407 B
Bash
Executable file
21 lines
407 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
export LC_ALL=C.UTF-8
|
|
export LANG=C.UTF-8
|
|
|
|
if [ $(id -u) -eq 0 ]
|
|
then
|
|
# required so that the postgres user can create files
|
|
chmod 777 .
|
|
chmod 777 features
|
|
SU='su postgres -p -c'
|
|
else
|
|
SU='bash -c'
|
|
fi
|
|
|
|
for PG_VERSION in /usr/lib/postgresql/*; do
|
|
$SU "export PATRONI_POSTGRESQL_BIN_DIR=/usr/lib/postgresql/$(basename ${PG_VERSION})/bin; behave"
|
|
done
|