backporting offline config generation to prevent config clobbering
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 12 Dec 2007 14:35:34 +0000 (14:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 12 Dec 2007 14:35:34 +0000 (14:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_1@8204 dcc99617-32d9-48b4-a31d-7c20da2025e4

config.sh

index b40845c..c96d862 100755 (executable)
--- a/config.sh
+++ b/config.sh
@@ -205,6 +205,32 @@ function writeConfig {
        _write '$main::config{index} = "config.cgi";';
 
 
+    # --------------------------------------------------------------------
+       # Now we'll write out the offline config
+       CONFIG_FILE='Open-ILS/src/offline/offline-config.pl';
+       rm -f "$CONFIG_FILE";
+       echo "Writing bootstrapping config to $CONFIG_FILE...";
+
+    _write "\$main::config{base_dir} = '$PREFIX/var/data/offline/';";
+    _write "\$main::config{bootstrap} = '$ETCDIR/opensrf_core.xml';";
+
+       STR='$main::config{dsn} =';
+               STR="$STR 'dbi:${DBDRVR}:host=";
+               STR="${STR}${DBHOST};dbname=";
+               STR="${STR}${DBNAME};port=";
+               STR="${STR}${DBPORT}';";
+       _write "$STR"
+
+       STR='$main::config{usr} =';
+               STR="$STR '$DBUSER';";
+       _write "$STR"
+       
+       STR='$main::config{pw} =';
+               STR="$STR '$DBPW';";
+       _write "$STR"
+    # --------------------------------------------------------------------
+       
+
        prompt "";
        prompt "";
        prompt "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";