X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-support%2Fpuppet%2Ffiles%2Fpuppetlabs-postgresql%2Fpostgresql.service;fp=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-support%2Fpuppet%2Ffiles%2Fpuppetlabs-postgresql%2Fpostgresql.service;h=3b4c5cada15869f07a469ee2830815f3d075ca41;hb=e0634c6eaf2fe2641a0fb90e84a5defb880b1335;hp=0000000000000000000000000000000000000000;hpb=210d0f78485e760dffcdd3f630f59cec797f3f11;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-postgresql/postgresql.service b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-postgresql/postgresql.service new file mode 100644 index 0000000..3b4c5ca --- /dev/null +++ b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-postgresql/postgresql.service @@ -0,0 +1,22 @@ +[Unit] +Description=PostgreSQL database server +After=network.target + +[Install] +WantedBy=multi-user.target + +[Service] +Type=forking +User=postgres +Group=postgres +# Disable OOM kill on the postmaster +OOMScoreAdjust=-17 + +PermissionsStartOnly=true +ExecStartPre=-/etc/postgresql/postgresql-init initdb +ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o "-p ${PGPORT}" -w -t 300 +ExecStop=/usr/bin/pg_ctl stop -D ${PGDATA} -s -m fast +ExecReload=/usr/bin/pg_ctl reload -D ${PGDATA} -s + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300