🔒 Repository is read-only – file editing is disabled.

recipes/utils/postgresql/postgresql.service.post-install main

13 linii Raw ← Powrót
12345678910111213
INFO="\033[1;36m"
NORMAL="\033[0;39m"
if [ ! -d srv/pgsql/data ]; then
	install -v -dm700 srv/pgsql/data
	chown -R postgres:postgres srv/pgsql
	printf "${INFO} srv/pgsql/data created ${NORMAL}\n"
	su - postgres -c '/usr/bin/initdb -D srv/pgsql/data'
fi
if [ ! -d run/postgresql ]; then
	install -v -dm755 run/postgresql
	chown -R postgres:postgres run/postgresql
	printf "${INFO} run/postgresql created ${NORMAL}\n"
fi