#!/data/data/com.termux/files/usr/bin/sh
mkdir -p ~/.postgres
if [ -f "~/.postgres/postgresql.conf" ]; then DATADIR="~/.postgres"; else DATADIR="/data/data/com.termux/files/usr/var/lib/postgresql"; fi
exec postgres -D $DATADIR 2>&1
