27aa74
#!/bin/sh
27aa74
#
27aa74
# Legacy action script for "service postgresql initdb"
27aa74
27aa74
# Find the name of the service
27aa74
SERVICE_NAME=$(basename $(dirname "$0"))
27aa74
if [ x"$SERVICE_NAME" = x. ]
27aa74
then
27aa74
    SERVICE_NAME=postgresql
27aa74
fi
27aa74
27aa74
echo Hint: the preferred way to do this is now '"postgresql-setup initdb"' >&2
27aa74
27aa74
/usr/bin/postgresql-setup initdb "$SERVICE_NAME"
27aa74
27aa74
exit $?