Files
configpolicy/roles/postgresql-server/templates/postgresql-setup.service.j2
Dustin C. Hatch afe4fb7eff roles/postgresql-server: Deploy PostgreSQL
The *postgresql-server* role installs and configures PostgreSQL on
Fedora/RHEL-based distributions.
2018-04-14 15:23:44 -05:00

12 lines
250 B
Django/Jinja

[Unit]
Before=postgresql.service
[Service]
Type=oneshot
RemainAfterExit=true
Environment=PGDATA={{ pgdata_dir }}
Environment=LANG={{ pg_locale }}
User=postgres
Group=postgres
ExecStart=/bin/sh -c "[ -f ${PGDATA}/PG_VERSION ] || initdb -D ${PGDATA}"