install-eg.sh: tweaks to deletepatron, skin folders, etc
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 9 Jul 2015 18:52:27 +0000 (11:52 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 9 Jul 2015 18:52:27 +0000 (11:52 -0700)
deployment/install-eg.sh

index 178ec3c..7ed10d9 100755 (executable)
@@ -150,8 +150,14 @@ cd ${INSTALLDIR}/var/web/xul/server/locale/en-CA && mv multiclass_search_help.ht
  
 # 6. deletepatron
 # ensure apache conf contains deletepatron config (location should be ${INSTALLDIR}/var/web/deletepatron)
-#cd ${INSTALLDIR}/var/web && git clone https://github.com/twirlip/deletepatron.git
-#cd ${INSTALLDIR}/var/web/deletepatron && git checkout eg22 && find . -name "*.pm" | xargs sed -i -e 's|/openils|/srv/openils|g'
+if [[ ! -d "${INSTALLDIR}/var/web/deletepatron" ]] ; then
+  NEW_DELETEPATRON_INSTALL="true"
+  cd ${INSTALLDIR}/var/web && git clone https://github.com/twirlip/deletepatron.git
+fi
+cd ${INSTALLDIR}/var/web/deletepatron && git checkout eg22
+if [[ -n "$NEW_DELETEPATRON_INSTALL" ]] ; then
+  find ${INSTALLDIR}/var/web/deletepatron -name "*.pm" | xargs sed -i -e 's|/openils|/srv/openils|g'
+fi
 apt-get install -y libcgi-session-perl libhtml-template-perl
 
 # 7. support scripts - XXX deprecated?
@@ -187,7 +193,7 @@ if [ ! -d "${INSTALLDIR}/var/data/offline/blocked" ] ; then
     mkdir -p ${INSTALLDIR}/var/data/offline/blocked
   fi
 fi
-if [ ! -e "${INSTALLDIR}/var/web/standalone/list.txt" ] ; then ln -s ${INSTALLDIR}/var/data/offline/blocked/patron-block-list.txt ${INSTALLDIR}/var/web/standalone/list.txt ; fi
+if [ ! -e "${INSTALLDIR}/var/web/standalone/list.txt" ] ; then ln -sf ${INSTALLDIR}/var/data/offline/blocked/patron-block-list.txt ${INSTALLDIR}/var/web/standalone/list.txt ; fi
 if [ ! -e "${INSTALLDIR}/bin/update-offline-blocked-list.sh" ] ; then cp ${SITKATOOLS}/maintenance/update-offline-blocked-list.sh ${INSTALLDIR}/bin/update-offline-blocked-list.sh ; fi
 
 cp ${SITKACONF}/files${INSTALLDIR}/var/data/zips.txt/${HOSTNAME} ${INSTALLDIR}/var/data/zips.txt
@@ -201,6 +207,8 @@ done
 # 9. make sure opensrf owns all the stuff we just did
 chown -R opensrf:opensrf ${INSTALLDIR}
 chown -R opensrf:opensrf /home/opensrf
+chmod 777 ${INSTALLDIR}/var/skins
+chmod 777 ${INSTALLDIR}/var/web/css/skin
 
 # 10. staff client stuff
 apt-get install -y nsis unzip