]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.init
- check if postmaster is realy rtnning (don't belive in lock file)
[packages/postgresql.git] / postgresql.init
index 24b657eee345b3e1bab2921fae534b206cea235d..75f7b6f233faa94e2a41ced26aed2521586f9fa1 100644 (file)
@@ -32,6 +32,21 @@ if is_no "${NETWORKING}"; then
        exit 1
 fi
 
+# check if postmaster is realy alive
+if [ -f /var/lib/pgsql/postmaster.pid ]; then
+ if ps -p `head -1 /var/lib/pgsql/postmaster.pid` > /dev/null ; then
+        #ok. it's alive
+       echo > /dev/null;
+ else
+        # oh, it has crashed
+        rm -f  /var/lock/subsys/postgresql
+ fi
+else
+       # it's stoped. 
+       rm -f  /var/lock/subsys/postgresql
+fi
+
+
 # See how we were called.
 case "$1" in
   start)
This page took 0.190378 seconds and 4 git commands to generate.