[Lunar-commits] <moonbase> postgresql: Adding some optional_depends and systemd.

Dennis `stumbles` Veatch stumbles at lunar-linux.org
Thu Nov 10 12:31:18 CET 2011


commit 0801c0b8dee0fb197059b46ec4895dd11d306ef3
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date:   Thu Nov 10 06:31:18 2011 -0500

    postgresql: Adding some optional_depends and systemd.
---
 sql/postgresql/DEPENDS                      |    3 +++
 sql/postgresql/systemd.d/postgresql.conf    |    2 ++
 sql/postgresql/systemd.d/postgresql.service |   17 +++++++++++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/sql/postgresql/DEPENDS b/sql/postgresql/DEPENDS
index af61ca5..fd9adfb 100644
--- a/sql/postgresql/DEPENDS
+++ b/sql/postgresql/DEPENDS
@@ -4,6 +4,9 @@ optional_depends "openssl"       "--with-openssl" "" "for SSL connections"
 optional_depends "perl"          "--with-perl"    "" "for perl programming"
 optional_depends "Python"        "--with-python"  "" "for python programming"
 optional_depends "Linux-PAM"     "--with-pam"     "" "for user authentication"
+optional_depends "heimdal"       "--with-gssapi"  "" "for gssapi support"
+optional_depends "openldap"      "--with-ldap"    "" "for ldap support"
+optional_depends "zlib"          ""               "--without-zlib" "for compression support"
 
 optional_depends "timezone-data" "--with-system-tzdata"  \
                  "--without-system-tzdata" "use system timezone data"
diff --git a/sql/postgresql/systemd.d/postgresql.conf b/sql/postgresql/systemd.d/postgresql.conf
new file mode 100644
index 0000000..b2d823f
--- /dev/null
+++ b/sql/postgresql/systemd.d/postgresql.conf
@@ -0,0 +1,2 @@
+# See tmpfiles.d(5) for details
+d /var/run/postgresql 2775 postgres postgres -
diff --git a/sql/postgresql/systemd.d/postgresql.service b/sql/postgresql/systemd.d/postgresql.service
new file mode 100644
index 0000000..dd008ae
--- /dev/null
+++ b/sql/postgresql/systemd.d/postgresql.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+User=postgres
+Environment=PGDATA=/var/lib/pgsql/data
+ExecStart=/bin/sh -c 'PGDATA=/var/lib/pgsql/data exec /usr/bin/postgres -c config_file=/var/lib/pgsql/data/postgresql.conf >> /var/lib/pgsql/data/serverlog'
+
+# Use pg_ctl stop to shutdown the server, do not attempt to kill the processes.
+# It does some more checks (online backups) which we don't want to duplicate.
+ExecStop=/bin/sh -c 'PGDATA=/var/lib/pgsql/data exec /usr/bin/pg_ctl -m fast -s -w -t 20'
+KillMode=none
+
+[Install]
+WantedBy=multi-user.target
+


More information about the Lunar-commits mailing list