Add support for including a preconfigured oils_sip.xml into the custom directory...
authorAndy Witter <awitter@georgialibraries.org>
Tue, 14 Jan 2014 13:27:01 +0000 (08:27 -0500)
committerAndy Witter <awitter@georgialibraries.org>
Tue, 14 Jan 2014 13:27:01 +0000 (08:27 -0500)
Signed-off-by: Andy Witter <awitter@georgialibraries.org>
GenaSYS.sh
templates/setup.sh

index e6b47f1..c5db6a9 100755 (executable)
@@ -25,8 +25,8 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.26"
-       DATE_="2010-09-23; last update: 2014-01-13"
+    VERSION_="1.27"
+       DATE_="2010-09-23; last update: 2014-01-14"
      AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
         URL_="http://evergreen-ils.org"
    CATEGORY_="devel"
@@ -224,8 +224,12 @@ echo
 echo "Installation Notes:"
 echo "==================="
 echo
-echo -e $COL_BR_RED'*** WARNING!! ***'$COL_RESET
+echo -e $COL_BR_RED"*** WARNING!! \c"$COL_RESET;sleep 0.5
+echo -e $COL_BR_RED"WARNING!! \c"$COL_RESET;sleep 0.5
+echo -e $COL_BR_RED"WARNING!! ***\c"$COL_RESET;sleep 0.5
+sleep 1
 echo -e $COL_BR_CYAN
+echo
 echo "Please read the following installation notes or"
 echo "you're gonna be real messed up...."
 echo -e $COL_RESET
@@ -263,6 +267,12 @@ echo
 echo -e ${COL_BR_CYAN}"5 __Custom KPAC:"${COL_RESET}
 echo "If you are using a customized KPAC then copy your custom"
 echo -e ${COL_BR_GREEN}kpac.xml${COL_RESET} to the${COL_YELLOW} "${CUSTOMDIR}" ${COL_RESET} directory.
+sleep 0.1
+echo
+echo -e ${COL_BR_CYAN}"6 __SIP Server Configuration:"${COL_RESET}
+echo -e "The SIP server requires a configured" ${COL_BR_GREEN}oils_sip.xml${COL_RESET} 
+echo -e "If you plan on using the SIP servers in the cluster then copy"
+echo -e "a preconfigured" ${COL_BR_GREEN}oils_sip.xml${COL_RESET} "to the"${COL_YELLOW} "${CUSTOMDIR}" ${COL_RESET} directory.
 sleep 3
 echo
 echo -e "Press ${COL_BR_CYAN}[Enter]${COL_RESET} to continue or ${COL_BR_CYAN}[Ctrl-C]${COL_RESET} to quit now" 
@@ -2726,6 +2736,7 @@ fi
 if echo ${NODE_FOLDER} | grep -q sip0
 then
        cp -f "$TEMPLATEDIR/Net-Z3950-SimpleServer-1.12.tar.gz" "setup_${NODE_FOLDER}"
+       [ -e "${CUSTOMDIR}/oils_sip.xml" ] && cp -f "${CUSTOMDIR}/oils_sip.xml" ../setup_${SUBFOLDER}
 fi
 if echo ${NODE_FOLDER} | grep -q reporter0
 then
index 72fd167..11c3605 100755 (executable)
@@ -449,7 +449,7 @@ fi
 
 AutoGen () { ### Run Autogen # this is currently defunct.
 if [ "$OSRF_NODE" = "1" ]
-       then
+then
        echo "Restarting OpenSRF..."
        echo
        sleep 1
@@ -575,15 +575,21 @@ fi
 ### Setup SIP
 if cat /etc/hostname | grep -q "sip0"
 then
-       chown -R opensrf:opensrf /opt/SIPServer
-       chown -R opensrf:opensrf /openils
-       echo 
-       echo -e $COL_BR_YELLOW"IMPORTANT **"$COL_GREEN
-        echo "To complete the setup of the SIP service"
-        echo "there are some manual steps that must be taken."
-        echo "First, reboot this host then login and continue the steps in the docs"
-        echo "See: http://docs.evergreen-ils.org/2.0/draft/html/sipserver.html"
-        echo -e "Continue the steps from the section labled" $COL_RESET$COL_BR_GREEN"\"Configuring the Server\"" $COL_RESET
+       if [ -e oils_sip.xml ]
+       then
+               echo
+               echo -e ${COL_BR_GREEN}"Found pre-configured oils_sip.xml"${COL_RESET}
+               echo -e ${COL_BR_CYAN}"Using custom oils_sip.xml"${COL_RESET}
+               cp -f oils_sip.xml /openils/conf
+       else
+               echo 
+               echo -e $COL_BR_YELLOW"IMPORTANT!! MANUAL STEPS REQUIRED**"$COL_GREEN
+               echo "To complete the setup of the SIP service"
+               echo "there are some manual steps that must be taken."
+               echo "First, reboot this host then login and continue the steps in the docs"
+               echo "See: http://docs.evergreen-ils.org/2.0/draft/html/sipserver.html"
+               echo -e "Continue the steps from the section labled" $COL_RESET$COL_BR_GREEN"\"Configuring the Server\"" $COL_RESET
+       fi
                if [ -e /etc/init.d/oils_sip ]
                then
                        update-rc.d oils_sip defaults
@@ -602,8 +608,11 @@ then
                         echo "Failed to install new crontab for tar_file"
                         sleep 3
                 fi
+       chown -R opensrf:opensrf /opt/SIPServer
+        chown -R opensrf:opensrf /openils
 fi
 
+### Setup backup server.
 if cat /etc/hostname | grep -q "backup0"
 then
        #echo "postgres:x:103:107:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash" >> /etc/passwd