do not init drupal db if using 6.x
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 6 Jan 2009 12:42:47 +0000 (12:42 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 6 Jan 2009 12:42:47 +0000 (12:42 +0000)
plc.d/postgresql

index 8105637..8099462 100755 (executable)
@@ -165,7 +165,9 @@ case "$1" in
        check
        if ! psql -U $PLC_DB_USER -c "" drupal >/dev/null 2>&1 ; then
            createdb -U postgres --encoding=UNICODE --owner=$PLC_DB_USER drupal
-           psql -U $PLC_DB_USER -f /var/www/html/database/database.pgsql drupal
+           # when using drupal 6.x, we must not do this
+           drupal_schema=/var/www/html/database/database.pgsql
+           [ -f $drupal_schema ] && psql -U $PLC_DB_USER -f $drupal_schema drupal
        fi
        check