install-eg.sh: fix error in tarball download
[sitka/sitka-tools.git] / deployment / install-eg.sh
1 #!/bin/bash
2 # IMPORTANT! This script assumes you have already installed OpenSRF.
3
4 HOSTNAME="nonprod"
5 DEFAULT_USER="opensrf"
6 INSTALL_USER="opensrf"
7 BUILDDIR="/home/${INSTALL_USER}/evergreen"
8 INSTALLDIR="/srv/openils"
9 BRANCH="user/jeffdavis/eg314-tpac"
10 STAMP_ID="rel_3_1_4"
11 ALT_STAMP_IDS="3_1_4"
12 VERSION="3.1.4.sitka.1"
13 SITKACONF="/home/${DEFAULT_USER}/sysadmin"
14 SITKACONF_BRANCH="master"
15 SITKATOOLS="/root/sitka-tools"
16
17 THISHOST=`hostname -s`
18
19 suwrap() {
20   su -s /bin/bash -c "source ~/.bashrc ; $1" $2
21 }
22
23 while getopts ":pecWbt" opt ; do
24   case $opt in
25     p ) PROD="prod";;
26     e ) EDI="edi";;
27     c ) CRONTAB="crontab";;
28     W ) SKIPWEBCLIENT="skipwebclient";;
29     b ) USEBUNDLE="usebundle";;
30     t ) TARBALL="tarball";;
31   esac
32 done
33 shift $(($OPTIND - 1))
34
35 if [[ -n "$PROD" ]] ; then
36   echo 'this is a production install'
37   [ "$HOSTNAME" == "nonprod" ] && HOSTNAME="prod"
38 else
39   echo 'this is NOT a production install'
40 fi
41
42 # as DEFAULT_USER
43
44 # grab Sitka config files
45 if [ ! -d "${SITKACONF}" ]
46 then
47   # this will fail unless DEFAULT_USER has read access to the repo
48   suwrap "cd /home/${DEFAULT_USER} && git clone git+ssh://git@git.sitka.bclibraries.ca/sitka-infra/sysadmin" ${DEFAULT_USER} || { echo "Could not get config files; exiting." ; exit 1; }
49 fi
50 suwrap "cd ${SITKACONF} && git fetch origin && git checkout ${SITKACONF_BRANCH} && git pull" ${DEFAULT_USER} || { echo "Could not checkout ${SITKACONF_BRANCH} config files; exiting." ; exit 1; }
51
52 if [[ -n "$TARBALL" ]] ; then
53   EGRELEASE="Evergreen-ILS-${VERSION}"
54   EGRELEASETGZ="${EGRELEASE}.tar.gz"
55   [ ${VERSION} == "3.1.0" ] && EGRELEASETGZ="Evergreen-ILS-3.1.0a.tar.gz"
56   BUILDDIR="/home/${INSTALL_USER}/${EGRELEASE}"
57   BRANCH="$VERSION"
58   echo "installing packaged upstream release ${EGRELEASE}"
59   # download and unpack EG release
60   rm -rf ${BUILDDIR}
61   if [ ! -f "/home/${INSTALL_USER}/${EGRELEASETGZ}" ] ; then
62     suwrap "cd /home/${INSTALL_USER} && wget http://open-ils.org/downloads/${EGRELEASETGZ}" ${INSTALL_USER} || { echo "Could not download EG release tarball ${EGRELEASETGZ}" ; exit 1; }
63   fi
64   suwrap "cd /home/${INSTALL_USER} && tar xzf ${EGRELEASETGZ}" ${INSTALL_USER}
65 else
66   # checkout EG source
67   if [ ! -d "${BUILDDIR}" ]
68   then
69     suwrap "cd /home/${INSTALL_USER} && git clone git+ssh://git@git.sitka.bclibraries.ca/sitka/evergreen evergreen" ${INSTALL_USER}
70   fi
71   suwrap "cd ${BUILDDIR} && git fetch origin && git checkout ${BRANCH} && git pull" ${INSTALL_USER}
72 fi
73
74  
75 # as root
76 cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-xenial
77 if [[ ! -n "$TARBALL" ]] ; then
78   cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-xenial-developer # required for web client
79 fi
80 # by default, CPAN needs some manual input at this point; you can just accept all defaults
81  
82 # web client
83 if [[ ! -n "$TARBALL" && ! -n "$SKIPWEBCLIENT" ]] ; then
84   if [[ -n "$USEBUNDLE" ]] ; then
85     # use bundled web client dependencies from upstream
86     if [ ! -d "/home/${INSTALL_USER}/web-client-deps" ] ; then
87       suwrap "cd /home/${INSTALL_USER} && git clone git://git.sitka.bclibraries.ca/sitka/web-client-deps web-client-deps" ${INSTALL_USER}
88     fi
89     suwrap "cd /home/${INSTALL_USER}/web-client-deps && git checkout ${STAMP_ID}" ${INSTALL_USER}
90     if [ -d "${BUILDDIR}/Open-ILS/web/js/ui/default/staff/build" ] ; then rm -rf ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/build ; fi
91     suwrap "cp -r /home/${INSTALL_USER}/web-client-deps/build ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/build" ${INSTALL_USER}
92   else
93     # install dependencies
94     cd ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/
95     suwrap "npm install" ${INSTALL_USER}
96     suwrap "npm run build-prod && npm run test" ${INSTALL_USER} || { echo 'Could not install files for web-based staff client' ; exit 1; }
97   fi
98 fi
99
100 # as INSTALL_USER
101 [ ! -n "$TARBALL" ] && suwrap "cd ${BUILDDIR} && autoreconf -i" ${INSTALL_USER} # not required for release versions
102 suwrap "PATH=${INSTALLDIR}/bin:\$PATH cd ${BUILDDIR} && PATH=${INSTALLDIR}/bin:\$PATH ./configure -C --prefix=${INSTALLDIR} --sysconfdir=${INSTALLDIR}/conf --with-opensrf-headers=${INSTALLDIR}/include/ --with-opensrf-libs=${INSTALLDIR}/lib/" ${INSTALL_USER}
103 suwrap "cd ${BUILDDIR} && make" ${INSTALL_USER}
104 suwrap "cd ${BUILDDIR}/build/i18n && make LOCALE=fr-CA install && make LOCALE=en-CA install" ${INSTALL_USER}
105  
106 # as root
107 cd ${BUILDDIR} && make STAFF_CLIENT_VERSION=${VERSION} STAFF_CLIENT_STAMP_ID=${STAMP_ID} install
108 mv ${INSTALLDIR}/var/web/reports/fm_IDL.xml ${INSTALLDIR}/var/web/reports/fm_IDL.xml.orig && cp ${INSTALLDIR}/conf/fm_IDL.xml ${INSTALLDIR}/var/web/reports/
109  
110 # Apache stuff (as root):
111 APACHEFILES="/etc/apache2/mods-available/mpm_prefork.conf"
112 for APACHEFILE in ${APACHEFILES}
113 do
114   [[ -e "${APACHEFILE}" ]] && mv ${APACHEFILE} ${APACHEFILE}.`date +%Y-%m-%d-%H%M%S`
115   cp ${SITKACONF}/files/${APACHEFILE}/${HOSTNAME} ${APACHEFILE}
116 done
117 cp ${BUILDDIR}/Open-ILS/examples/apache/eg_startup /etc/apache2/eg_startup
118 sed -i 's/export APACHE_RUN_USER=www-data/export APACHE_RUN_USER=opensrf/' /etc/apache2/envvars
119 a2dismod mpm_event
120 a2enmod mpm_prefork
121 a2enmod headers
122 # ensure opensrf can run Apache
123 chown -R opensrf:opensrf /var/lock/apache2
124
125 # More Apache stuff for non-production sites
126 if [[ ! -n "$PROD" ]] ; then
127   if [ ! -d "/etc/apache2/includes" ] ; then
128     mkdir /etc/apache2/includes
129   fi
130   SITECONFIGS="/etc/apache2/sites-available/test-server.conf"
131   for SITECONFIG in ${SITECONFIGS} ; do
132     cp ${SITKACONF}/files/${SITECONFIG}/${HOSTNAME} ${SITECONFIG}
133     sed -i "s|__NONPROD__|${THISHOST}|g" ${SITECONFIG}
134     sed -i "s|__VERSION__|${VERSION}|g" ${SITECONFIG}
135   done
136   a2ensite test-server.conf
137   a2dissite 000-default
138   if [ ! -d "/etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop" ]
139   then
140     mkdir -p /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop
141     cp ${SITKACONF}/files/etc/ssl/apache2/star.catalogue.libraries.coop/star.catalogue.libraries.coop.crt /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop/star_catalogue_libraries_coop.crt
142     cp ${SITKACONF}/files/etc/ssl/apache2/star.catalogue.libraries.coop/star.catalogue.libraries.coop.key /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop/star_catalogue_libraries_coop.key
143     cp ${SITKACONF}/files/etc/ssl/apache2/star.catalogue.libraries.coop/star.catalogue.libraries.coop.ca /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop/star_catalogue_libraries_coop.ca
144   fi
145 fi
146
147 # websockets config
148 if [[ ! -n "$SKIPWEBCLIENT" ]] ; then
149     # use nginx proxy for websockets traffic
150     apt-get install -y nginx
151     cp -b ${SITKACONF}/files/etc/nginx/sites-available/osrf-ws-http-proxy/${HOSTNAME} /etc/nginx/sites-available/osrf-ws-http-proxy
152     ln -s /etc/nginx/sites-available/osrf-ws-http-proxy /etc/nginx/sites-enabled/osrf-ws-http-proxy
153     rm /etc/nginx/sites-enabled/default
154     cp -b ${SITKACONF}/files/etc/apache2/ports.conf/${HOSTNAME} /etc/apache2/ports.conf
155     WSJSFILES="opensrf_ws.js opensrf_ws_shared.js"
156     for WSJSFILE in ${WSJSFILES} ; do
157         # NOTE: this should be unnecessary if we installed OpenSRF with ./configure --with-websockets-port=443
158         sed -i 's/var WEBSOCKET_PORT_SSL = 7682;/var WEBSOCKET_PORT_SSL = 443;/g' ${INSTALLDIR}/lib/javascript/$WSJSFILE
159     done
160     # apache2-websockets
161     if [[ ! -n "$PROD" ]] ; then
162         if [ ! -d "/etc/apache2-websockets/ssl" ] ; then
163             cd /etc/apache2-websockets/ && ln -s /etc/apache2/ssl
164         fi
165     fi
166     if [ ! -d "/etc/apache2-websockets/includes" ] ; then
167         mkdir /etc/apache2-websockets/includes
168     fi
169     for WSINCLUDE in `ls /etc/apache2/includes` ; do
170         ln -s /etc/apache2/includes/${WSINCLUDE} /etc/apache2-websockets/includes/
171     done
172     for WSSITE in `ls /etc/apache2/sites-available` ; do
173         ln -s /etc/apache2/sites-available/${WSSITE} /etc/apache2-websockets/sites-available/
174     done
175     for WSSITEENABLED in `ls /etc/apache2/sites-enabled` ; do
176         ln -s /etc/apache2-websockets/sites-available/${WSSITEENABLED} /etc/apache2-websockets/sites-enabled/
177     done
178     if [[ -d "/etc/apache2-websockets/ssl" ]] ; then
179         rm -rf /etc/apache2-websockets/ssl
180     fi
181     cd /etc/apache2-websockets && ln -s /etc/apache2/ssl
182 fi
183
184 # install default crontab, if specified
185 if [[ -c "$CRONTAB" ]]; then
186   if [ ! -f "/etc/cron.d/evergreen-dailies" ] ; then
187     cp ${SITKACONF}/files/etc/cron.d/evergreen-dailies/${HOSTNAME} /etc/cron.d/evergreen-dailies
188   fi
189 fi
190
191 # set up log rotation
192 if [[ ! -n "$PROD" ]] ; then
193   if [ ! -f "/etc/logrotate.d/evergreen" ]
194   then
195     cp ${SITKACONF}/files/etc/logrotate.d/evergreen/${HOSTNAME} /etc/logrotate.d/evergreen
196   fi
197 fi
198
199 # action trigger filters (prod only)
200 if [[ -n "$PROD" ]] ; then
201   if [ -f "${INSTALLDIR}/conf/action_trigger_filters.json" ] ; then
202     mv ${INSTALLDIR}/conf/action_trigger_filters.json ${INSTALLDIR}/conf/action_trigger_filters.json.`date +%Y-%m-%d-%H%M%S`
203   fi
204   cp ${SITKACONF}/files/${INSTALLDIR}/conf/action_trigger_filters.json/${HOSTNAME} ${INSTALLDIR}/conf/action_trigger_filters.json
205 fi
206  
207 # 0. osrf conf stuff 
208 # FIXME: ensure osrf conf files point at a real, distinct db!
209 OSRFCONFFILES="${INSTALLDIR}/conf/opensrf.xml ${INSTALLDIR}/conf/opensrf_core.xml"
210 for OSRFCONFFILE in ${OSRFCONFFILES}
211 do
212   mv ${OSRFCONFFILE} ${OSRFCONFFILE}.`date +%Y-%m-%d-%H%M%S`
213   cp ${SITKACONF}/files/${OSRFCONFFILE}/${HOSTNAME} ${OSRFCONFFILE}
214   sed -i "s|__HOSTNAME__|${THISHOST}|g" ${OSRFCONFFILE}
215 done
216 if [ ! -f "/home/opensrf/.srfsh.xml" ]
217 then
218   cp ${SITKACONF}/files/home/opensrf/.srfsh.xml/${HOSTNAME} /home/opensrf/.srfsh.xml
219 fi 
220
221 # 1. install dojo
222 if [ ! -f "/home/opensrf/dojo-release-1.3.3.tar.gz" ]
223 then
224   cd /home/opensrf && wget http://download.dojotoolkit.org/release-1.3.3/dojo-release-1.3.3.tar.gz
225 fi
226 tar -C ${INSTALLDIR}/var/web/js -xzf /home/opensrf/dojo-release-1.3.3.tar.gz
227 cp -r ${INSTALLDIR}/var/web/js/dojo-release-1.3.3/* ${INSTALLDIR}/var/web/js/dojo/.
228 # FIXME stock dojo is probably superfluous when we use the following Evergreen-specific tarball...
229 if [ ! -f "/home/opensrf/dojo.tgz" ] ; then
230   cd /home/opensrf && wget http://evergreen-ils.org/downloads/dojo.tgz
231 fi
232 tar -C ${INSTALLDIR}/var/web/js/dojo/ -zxf /home/opensrf/dojo.tgz
233  
234 # 2. set up staff client
235 cd ${INSTALLDIR}/var/web/xul && rm server && rm current
236 cd ${INSTALLDIR}/var/web/xul && ln -s ${STAMP_ID} current && ln -s current/server server
237 for ALT_STAMP_ID in ${ALT_STAMP_IDS}
238 do
239   cd ${INSTALLDIR}/var/web/xul && ln -s current ${ALT_STAMP_ID}
240 done
241  
242 # 3. install circ scripts and opac skins - DEPRECATED
243
244 # 4a. avoid 404s
245 touch ${INSTALLDIR}/var/web/css/skin/default/register_custom.css
246 touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/patron_custom.properties
247 touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/common_custom.properties
248 touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/offline_custom.properties
249 touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/auth_custom.properties
250 touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/cat_custom.properties
251 touch ${INSTALLDIR}/var/web/xul/server/locale/en-CA/circ_custom.properties
252 touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/patron_custom.properties
253 touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/common_custom.properties
254 touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/offline_custom.properties
255 touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/auth_custom.properties
256 touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/cat_custom.properties
257 touch ${INSTALLDIR}/var/web/xul/server/locale/en-US/circ_custom.properties
258 touch ${INSTALLDIR}/var/web/xul/server/skin/custom.js
259
260 # 4b. workaround for LP#1461683
261 cd ${INSTALLDIR}/var/web/xul/server/locale/en-CA && mv multiclass_search_help.html multiclass_search_help.html.orig && ln -s ../en-US/multiclass_search_help.html
262
263 # 5. locale hack - XXX deprecated?
264 #cd ${INSTALLDIR}/var/web/opac/locale && cp -fdr en-US en-US-bak && cp -fdr en-CA en-US
265  
266 # 6. deletepatron
267 # ensure apache conf contains deletepatron config (location should be ${INSTALLDIR}/var/web/deletepatron)
268 if [[ ! -d "${INSTALLDIR}/var/web/deletepatron" ]] ; then
269   NEW_DELETEPATRON_INSTALL="true"
270   cd ${INSTALLDIR}/var/web && git clone https://github.com/twirlip/deletepatron.git
271 fi
272 cd ${INSTALLDIR}/var/web/deletepatron && git checkout eg22
273 if [[ -n "$NEW_DELETEPATRON_INSTALL" ]] ; then
274   find ${INSTALLDIR}/var/web/deletepatron -name "*.pm" | xargs sed -i -e 's|/openils|/srv/openils|g'
275 fi
276 apt-get install -y libcgi-session-perl libhtml-template-perl
277
278 # 7. support scripts
279 cp ${BUILDDIR}/Open-ILS/src/support-scripts/generate_circ_notices.pl ${INSTALLDIR}/bin
280 cp ${BUILDDIR}/Open-ILS/src/support-scripts/oils_header.pl ${INSTALLDIR}/bin
281 cp ${BUILDDIR}/Open-ILS/src/support-scripts/badge_score_generator.pl ${INSTALLDIR}/bin
282
283 # 7.5 EDI (optional)
284 if [[ -n "$EDI" ]] ; then
285   cp -r ${BUILDDIR}/Open-ILS/src/edi_translator ${INSTALLDIR}/var/edi
286   cd ${INSTALLDIR}/var/edi && ./install.sh
287   cp ${BUILDDIR}/Open-ILS/src/support-scripts/edi_pusher.pl ${INSTALLDIR}/bin
288   cp ${BUILDDIR}/Open-ILS/src/support-scripts/edi_fetcher.pl ${INSTALLDIR}/bin
289   cp ${SYSADMIN}/files/${INSTALLDIR}/bin/edi_per_account_fetcher.sh ${INSTALLDIR}/bin/edi_per_account_fetcher.sh
290 fi
291
292 # 8. setup start page
293 if [ ! -d "${INSTALLDIR}/var/web/news" ]
294 then
295   mkdir ${INSTALLDIR}/var/web/news
296 fi
297 if [ ! -d "${INSTALLDIR}/var/web/news/media" ]
298 then
299   mkdir ${INSTALLDIR}/var/web/news/media
300 fi
301 NEWSFILES="index.html style.css media/logo.png media/book.png media/policy.png media/dash.png media/delete.png"
302 for NEWSFILE in ${NEWSFILES}
303 do
304   if [ -f "${SITKACONF}/files/${INSTALLDIR}/var/web/news/${NEWSFILE}/${HOSTNAME}" ]
305   then
306     cp ${SITKACONF}/files/${INSTALLDIR}/var/web/news/${NEWSFILE}/${HOSTNAME} ${INSTALLDIR}/var/web/news/${NEWSFILE}
307   fi
308 done
309 if [[ -n "$PROD" ]] ; then
310   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
311   if [ ! -e "/etc/cron.d/news" ] ; then cp ${SITKACONF}/files/etc/cron.d/news/${HOSTNAME} /etc/cron.d/news ; fi
312 else
313   # nonprod server, auto-update splash page with install info
314   TODAY=`date +'%A %d %B %Y'`
315   sed -i "s|__THISHOST__|${THISHOST}|g" ${INSTALLDIR}/var/web/news/index.html
316   sed -i "s|__TODAY__|${TODAY}|g" ${INSTALLDIR}/var/web/news/index.html
317   sed -i "s|__VERSION__|${VERSION}|g" ${INSTALLDIR}/var/web/news/index.html
318   sed -i "s|__BRANCH__|${BRANCH}|g" ${INSTALLDIR}/var/web/news/index.html
319 fi
320
321 # 8.5 offline patron list
322 if [ ! -d "${INSTALLDIR}/var/data/offline/blocked" ] ; then 
323   # TODO: handle prod - an NFS share should exist
324   if [[ ! -n "$PROD" ]] ; then
325     mkdir -p ${INSTALLDIR}/var/data/offline/blocked
326   fi
327 fi
328 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
329 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
330
331 cp ${SITKACONF}/files${INSTALLDIR}/var/data/zips.txt/${HOSTNAME} ${INSTALLDIR}/var/data/zips.txt
332
333 # install legacy OverDrive API integration
334 cp -r ${SITKATOOLS}/overdrive-eg-opac/build/* ${INSTALLDIR}/var/web/js/ui/default/opac
335 ODAPI_LIBS="bc mb"
336 for ODAPI_LIB in ${ODAPI_LIBS} ; do
337   cp ${SITKACONF}/files/${INSTALLDIR}/var/web/js/ui/default/opac/${ODAPI_LIB}/od_config.js ${INSTALLDIR}/var/web/js/ui/default/opac/${ODAPI_LIB}/od_config.js
338 done
339
340 # install mobile PAC
341 cd ${INSTALLDIR}/var/web/opac/extras && git clone git://git.sitka.bclibraries.ca/sitka/mobile-evergreen-opac.git mobile
342
343 # 9. make sure opensrf owns all the stuff we just did
344 echo 'managing file permissions...'
345 if [[ ! -n "$PROD" ]] ; then
346   chown -R opensrf:opensrf ${INSTALLDIR} 2>/dev/null
347 else
348   for file in `ls -1 ${INSTALLDIR} | grep -v var` ; do chown -R opensrf:opensrf ${INSTALLDIR}/$file ; done
349   chown opensrf:opensrf ${INSTALLDIR}/var
350   for file in `ls -1 ${INSTALLDIR}/var | egrep -v '(data|tmp|web)'` ; do chown -R opensrf:opensrf ${INSTALLDIR}/var/$file ; done
351   chown opensrf:opensrf ${INSTALLDIR}/var/data ${INSTALLDIR}/var/web
352   for file in `ls -1 ${INSTALLDIR}/var/data | grep -v offline` ; do chown -R opensrf:opensrf ${INSTALLDIR}/var/data/$file ; done
353   for file in `ls -1 ${INSTALLDIR}/var/web | grep -v reporter` ; do chown -R opensrf:opensrf ${INSTALLDIR}/var/web/$file ; done
354 fi
355 chown -R opensrf:opensrf /home/opensrf
356 SKINDIRS="${INSTALLDIR}/var/skins ${INSTALLDIR}/var/web/css/skin"
357 for SKINDIR in ${SKINDIRS} ; do
358   if [[ ! -d "${SKINDIR}" ]] ; then mkdir ${SKINDIR} ; fi
359   chmod 777 ${SKINDIR}
360   chown -R ${DEFAULT_USER}:${DEFAULT_USER} ${SKINDIR}
361 done
362 chown -R ${DEFAULT_USER}:${DEFAULT_USER} ${INSTALLDIR}/conf/kpac ${INSTALLDIR}/var/web/images/kpac
363
364 # 10. staff client stuff
365 apt-get install -y nsis unzip
366
367 # 11. integrity checker prereqs
368 apt-get install -y libconfig-simple-perl libgit-repository-perl libdate-manip-perl
369
370 # 12. paper overdue prereqs
371 apt-get install -y python-reportlab python-reportlab-accel unifont
372
373 echo 'Evergreen is installed!'
374