- bootstrap the db in the api script
authorMark Huang <mlhuang@cs.princeton.edu>
Thu, 18 Jan 2007 22:10:43 +0000 (22:10 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Thu, 18 Jan 2007 22:10:43 +0000 (22:10 +0000)
plc.d/db

index b4da453..9e41332 100755 (executable)
--- a/plc.d/db
+++ b/plc.d/db
@@ -7,7 +7,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: db,v 1.1 2006/06/23 21:41:42 mlhuang Exp $
+# $Id: db,v 1.2 2006/10/27 20:27:04 mlhuang Exp $
 #
 
 # Source function library and configuration
@@ -22,7 +22,7 @@ export PGPORT=$PLC_DB_PORT
 
 case "$1" in
     start)
-       if [ "$PLC_API_ENABLED" != "1" ] ; then
+       if [ "$PLC_DB_ENABLED" != "1" ] ; then
            exit 0
        fi
 
@@ -42,10 +42,6 @@ DELETE FROM variable WHERE name = 'site_name';
 INSERT INTO variable (name, value) VALUES ('site_name', 's:${#PLC_NAME}:"$PLC_NAME";');
 EOF
 
-       # Bootstrap the DB
-       db-config
-       check
-
        result "$MESSAGE"
        ;;
 esac