Tags: patch

The following patch to pgpool2's init script makes
sure /var/run/postgresql exists and sets proper permissions so it works
with and without PostgreSQL coexisting on the same machine.
-- 
Prof. Ernesto Hernández-Novich - MYS-220C - @iamemhn
Geek by nature, Linux by choice, Debian of course.
If you can't aptitude it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3
diff -Naur pgpool2-3.1.3.orig/debian/pgpool2.init.d pgpool2-3.1.3/debian/pgpool2.init.d
--- pgpool2-3.1.3.orig/debian/pgpool2.init.d	2012-10-12 04:49:23.000000000 -0430
+++ pgpool2-3.1.3/debian/pgpool2.init.d	2013-04-09 19:16:46.698088278 -0430
@@ -38,6 +38,11 @@
 
 
 d_start() {
+    # dirs under /var/run can go away on reboots
+    mkdir -p /var/run/postgresql
+    chmod u+rwx,g+rwxs,o+rw /var/run/postgresql/    # 2775
+    chown postgres:postgres /var/run/postgresql/
+
 	if is_running; then
 		:
 	else

Reply via email to