install-eg.sh: on non-prod installs, update splash page with install info
[sitka/sitka-tools.git] / deployment / install-eg.sh
index bb07c6d..938c1de 100755 (executable)
@@ -199,6 +199,14 @@ done
 if [[ -n "$PROD" ]] ; then
   if [ ! -e "${INSTALLDIR}/var/web/news/wikipull.pl" ] ; then cp ${SITKACONF}/files/${INSTALLDIR}/var/web/news/wikipull.pl/${HOSTNAME} ${INSTALLDIR}/var/web/news/wikipull.pl ; fi
   if [ ! -e "/etc/cron.d/news" ] ; then cp ${SITKACONF}/files/etc/cron.d/news/${HOSTNAME} /etc/cron.d/news ; fi
+else
+  # nonprod server, auto-update splash page with install info
+  THISHOST=`hostname -s`
+  TODAY=`date +'%A %d %B %Y'`
+  sed -i "s/__THISHOST__/${THISHOST}/g" ${INSTALLDIR}/var/web/news/index.html
+  sed -i "s/__TODAY__/${TODAY}/g" ${INSTALLDIR}/var/web/news/index.html
+  sed -i "s/__VERSION__/${VERSION}/g" ${INSTALLDIR}/var/web/news/index.html
+  sed -i "s/__BRANCH__/${BRANCH}/g" ${INSTALLDIR}/var/web/news/index.html
 fi
 
 # 8.5 offline patron list