Author: krejzi
Date: Sun May 12 09:47:06 2013
New Revision: 11170

Log:
Add new systemd units, minor fix to postgresql script to reflect latest changes.

Added:
   trunk/bootscripts/systemd/tmpfiles/postgresql.conf
   trunk/bootscripts/systemd/units/postgresql.service
Modified:
   trunk/bootscripts/blfs/init.d/postgresql
   trunk/bootscripts/systemd/default/saslauthd
   trunk/bootscripts/systemd/tmpfiles/saslauthd.conf

Modified: trunk/bootscripts/blfs/init.d/postgresql
==============================================================================
--- trunk/bootscripts/blfs/init.d/postgresql    Sun May 12 09:46:18 2013        
(r11169)
+++ trunk/bootscripts/blfs/init.d/postgresql    Sun May 12 09:47:06 2013        
(r11170)
@@ -34,6 +34,8 @@
    start)
       log_info_msg "Starting PostgreSQL daemon..."
 
+      install -dm755 -o postgres -g postgres /run/postgresql
+
       su - postgres -c '/usr/bin/pg_ctl start -W -D /srv/pgsql/data \
                          -l /srv/pgsql/data/logfile -o "-i" '
       evaluate_retval

Modified: trunk/bootscripts/systemd/default/saslauthd
==============================================================================
--- trunk/bootscripts/systemd/default/saslauthd Sun May 12 09:46:18 2013        
(r11169)
+++ trunk/bootscripts/systemd/default/saslauthd Sun May 12 09:47:06 2013        
(r11170)
@@ -14,8 +14,8 @@
 # Only one option may be used at a time. See the saslauthd man page
 # for more information.
 #
-# Example: MECHANISMS="pam"
-MECHANISMS="pam"
+# Example: MECHANISMS="shadow"
+MECHANISMS="shadow"
 
 # Additional options for this mechanism. (default: none)
 # See the saslauthd man page for information about mech-specific options.

Added: trunk/bootscripts/systemd/tmpfiles/postgresql.conf
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/bootscripts/systemd/tmpfiles/postgresql.conf  Sun May 12 09:47:06 
2013        (r11170)
@@ -0,0 +1 @@
+d /run/postgresql 0775 postgres postgres -

Modified: trunk/bootscripts/systemd/tmpfiles/saslauthd.conf
==============================================================================
--- trunk/bootscripts/systemd/tmpfiles/saslauthd.conf   Sun May 12 09:46:18 
2013        (r11169)
+++ trunk/bootscripts/systemd/tmpfiles/saslauthd.conf   Sun May 12 09:47:06 
2013        (r11170)
@@ -1 +1 @@
-d /run/saslauthd 710 root root -
+d /run/saslauthd 755 root root -

Added: trunk/bootscripts/systemd/units/postgresql.service
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/bootscripts/systemd/units/postgresql.service  Sun May 12 09:47:06 
2013        (r11170)
@@ -0,0 +1,25 @@
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=forking
+TimeoutSec=120
+User=postgres
+Group=postgres
+
+Environment=PGROOT=/srv/pgsql
+
+SyslogIdentifier=postgres
+PIDFile=${PGROOT}/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
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to