EG install scripts: nonprod-28 -> nonprod
[sitka/sitka-tools.git] / deployment / install-osrf.sh
index 9dce10e..f19384a 100755 (executable)
@@ -4,9 +4,9 @@ HOMEDIR="/home/${DEFAULT_USER}"
 BUILDDIR="${HOMEDIR}/opensrf"
 INSTALLDIR="/srv/openils"
 BRANCH="rel_2_4"
-HOSTNAME="nonprod-28"
+HOSTNAME="nonprod"
 SITKACONF="${HOMEDIR}/sysadmin"
-SITKACONF_BRANCH="eg28"
+SITKACONF_BRANCH="master"
 
 # test for ejabberd passwords
 if [ -z "$PRIVATE_ROUTER_PASSWD" -o -z "$PRIVATE_OPENSRF_PASSWD" -o -z "$PUBLIC_ROUTER_PASSWD" -o -z "$PUBLIC_OPENSRF_PASSWD" ]
@@ -53,12 +53,13 @@ su -c "cd ${BUILDDIR} && make" ${DEFAULT_USER}
 echo "Installing OpenSRF..."
 cd ${BUILDDIR} && make install
 useradd -m -s /bin/bash opensrf
-PATHFILES="/etc/profile /root/.bashrc /home/opensrf/.bashrc"
+PATHFILES="/etc/profile /root/.bashrc /home/${DEFAULT_USER}/.bashrc /home/opensrf/.bashrc"
 for PATHFILE in ${PATHFILES} ; do
-  if [[ -e "${PATHFILE}" && ! `egrep "PATH=.*${INSTALLDIR}/bin" "${PATHFILE}"` ]] ; then 
+  if [[ ! -e "${PATHFILE}" || ! `egrep "PATH=.*${INSTALLDIR}/bin" "${PATHFILE}"` ]] ; then 
     echo "export PATH=${INSTALLDIR}/bin:\$PATH" >> ${PATHFILE}
   fi
 done
+chown ${DEFAULT_USER}:${DEFAULT_USER} /home/${DEFAULT_USER}/.bashrc
 chown -R opensrf:opensrf ${INSTALLDIR}
  
 # as root, add the following two lines to /etc/hosts:
@@ -98,5 +99,5 @@ echo "OpenSRF is installed!"
 
 #/etc/init.d/apache2-websockets start
 
-echo "websockets is installed!"
+#echo "websockets is installed!"