2 ln -sf /openils/var/web/xul/rel_2_0_7/server/openils/var/web/xul/ /openils/var/web/xul/server
3 cp /openils/etc/opensrf.xml.example /opensrf/conf/opensrf.xml
4 ln -s /opensrf/conf/opensrf.xml /openils/etc/
5 cp /openils/etc/opensrf_core.xml.example /opensrf/conf/opensrf_core.xml
6 ln -s /opensrf/conf/opensrf_core.xml /openils/etc/
7 cp /openils/etc/oils_web.xml.example /opensrf/conf/oils_web.xml
8 ln -s /opensrf/conf/oils_web.xml /openils/etc/
10 # Set up the evergreen database
11 if su - postgres -c "createdb -T template0 --lc-ctype=C --lc-collate=C -E UNICODE evergreen" > /dev/null 2>&1
13 su - postgres -c "createlang plperl evergreen"
14 su - postgres -c "createlang plperlu evergreen"
15 su - postgres -c "createlang plpgsql evergreen"
16 su - postgres -c "psql -f /usr/share/postgresql/8.4/contrib/tablefunc.sql evergreen"
17 su - postgres -c "psql -f /usr/share/postgresql/8.4/contrib/tsearch2.sql evergreen"
18 su - postgres -c "psql -f /usr/share/postgresql/8.4/contrib/pgxml.sql evergreen"
20 # Add evergreen database user
21 if [ `su - postgres -c "psql -A -t -c \"select count(*) from pg_roles where rolname='evergreen'\""` = "0" ]
25 CREATE ROLE evergreen PASSWORD 'fixmepls' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
27 chown postgres.postgres $tfile
28 su - postgres -c "psql -f $tfile"
33 cd /openils/bin/ && perl eg_db_config.pl --update-config --service all --create-schema \
34 --create-offline --hostname localhost --port 5432 --user evergreen --password fixmepls \
35 --database evergreen --admin-user admin --admin-pass open-ils
37 echo "Example apache configuration placed at /etc/httpd/conf/eg.conf - you need"
38 echo "to incorporate this into your actual configuration for Evergreen to work."
40 if [ ! -d "/etc/httpd/ssl" ]; then
43 openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
46 if grep -q "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" /home/opensrf/.bashrc
47 then echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" | sudo -u opensrf tee -a /home/opensrf/.bashrc
50 chown -R opensrf:opensrf /openils/ /opensrf/