gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/deb-specific install-db.sh,1.34,1.35


From: lo-lan-do
Subject: [Gforge-commits] gforge/deb-specific install-db.sh,1.34,1.35
Date: Mon, 29 Nov 2004 08:18:27 -0600

Update of /cvsroot/gforge/gforge/deb-specific
In directory db.perdue.net:/tmp/cvs-serv24902/deb-specific

Modified Files:
        install-db.sh 
Log Message:
Don't die if DB server is down, but start it instead.


Index: install-db.sh
===================================================================
RCS file: /cvsroot/gforge/gforge/deb-specific/install-db.sh,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- install-db.sh       31 Oct 2004 14:18:02 -0000      1.34
+++ install-db.sh       29 Nov 2004 14:18:25 -0000      1.35
@@ -224,7 +224,12 @@
        fi
        
        # Install/upgrade the database contents (tables and data)
-       kill -HUP $(head -1 /var/lib/postgres/data/postmaster.pid)
+        pid=$(head -1 /var/lib/postgres/data/postmaster.pid 2>/dev/null)
+        if [ "$pid" = "" ] ; then
+           invoke-rc.d postgresql start
+       else
+           kill -HUP $pid
+       fi
        su -s /bin/sh gforge -c /usr/lib/gforge/bin/db-upgrade.pl 2>&1  | grep 
-v ^NOTICE:
        p=${PIPESTATUS[0]}
        if [ $p != 0 ] ; then





reply via email to

[Prev in Thread] Current Thread [Next in Thread]