add -s argument for loading sample data
authorJason Etheridge <jason@esilibrary.com>
Tue, 16 Jul 2013 15:45:48 +0000 (11:45 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 16 Jul 2013 15:45:48 +0000 (11:45 -0400)
Also use restart instead of start for osrf_ctl.sh, moving toward
making repeat invocations of eg_wheezy_installer.sh work better.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
installer/wheezy/eg_wheezy_installer.sh

index 91621dd..53a394b 100755 (executable)
@@ -29,12 +29,13 @@ ADMIN_PASS='demo123';
 # -----------------------------------------------------------------------
 # Handling passed arguments to the script
 # -----------------------------------------------------------------------
-while getopts ay option
+while getopts ays option
 do
         case "${option}"
         in
                 a) AUTOSTART=1;;
                 y) YES=1;;
+                s) SAMPLEDATA=--load-all-sample;;
         esac
 done
 
@@ -199,7 +200,7 @@ perl Open-ILS/src/support-scripts/eg_db_config \
     --create-database       \
     --create-schema         \
     --create-offline        \
-    --update-config         \
+    --update-config $SAMPLEDATA \
     --service all           \
     --user evergreen        \
     --password evergreen    \
@@ -258,9 +259,9 @@ if [ $AUTOSTART ]; then
 OSRF_COMMAND='
 export LD_LIBRARY_PATH=/openils/lib:/usr/local/lib:/usr/local/lib/dbd:$LD_LIBRARY_PATH \
 && export PATH=/openils/bin:$PATH \
-&& /openils/bin/osrf_ctl.sh -l -a start_router && sleep 5 \
-&& /openils/bin/osrf_ctl.sh -l -a start_perl   && sleep 10 \
-&& /openils/bin/osrf_ctl.sh -l -a start_c      && sleep 3 \
+&& /openils/bin/osrf_ctl.sh -l -a restart_router && sleep 5 \
+&& /openils/bin/osrf_ctl.sh -l -a restart_perl   && sleep 10 \
+&& /openils/bin/osrf_ctl.sh -l -a restart_c      && sleep 3 \
 && /openils/bin/autogen.sh /openils/conf/opensrf_core.xml \
 && echo Finis;
 '