From 2b120087f3fdddca03d79c6b67275b0509afa154 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Fri, 9 May 2014 10:52:06 +0000 Subject: Add a configure extension and relevant files for installing GitLab --- .../gitlab-install/systemd-units/postgres.service | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gitlab-server/usr/share/gitlab-install/systemd-units/postgres.service (limited to 'gitlab-server/usr/share/gitlab-install/systemd-units/postgres.service') diff --git a/gitlab-server/usr/share/gitlab-install/systemd-units/postgres.service b/gitlab-server/usr/share/gitlab-install/systemd-units/postgres.service new file mode 100644 index 00000000..ed46d965 --- /dev/null +++ b/gitlab-server/usr/share/gitlab-install/systemd-units/postgres.service @@ -0,0 +1,25 @@ +[Unit] +Description=PostgreSQL database server +After=network.target + +[Service] +Type=forking +TimeoutSec=120 +User=postgres +Group=postgres + +Environment=PGROOT=/home/postgres/pgsql + +SyslogIdentifier=postgres +PIDFile=/home/postgres/pgsql/data/postmaster.pid + +ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120 +ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload +ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast + +# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in +# killing Postgres, so adjust it downward +OOMScoreAdjust=-200 + +[Install] +WantedBy=multi-user.target -- cgit v1.2.1