# this script installs lagoon after you have built it in src and after you
# edited the conf/srm.conf file
#
# use it only if you wish to install Lagoon in the standard location

# cp src/rel2abs /usr/local/etc/httpd/cgi-bin
cp src/cache /usr/local/etc/httpd/cgi-bin
cat conf/srm.conf >> /usr/local/etc/httpd/conf/srm.conf
cp conf/cache.conf /usr/local/etc/httpd/conf

# create empty mirror directories and log files and give them to user nobody.
# this works on System V but not on BSD systems. SunOS and Solaris exhibit
# BSD behavior. SVR4 exhibits System V behavior.
# on Solaris and SunOS you must be root to do this.
mkdir /usr/local/etc/httpd/mirror
chgrp nobody /usr/local/etc/httpd/mirror
chown nobody /usr/local/etc/httpd/mirror

mkdir /usr/local/etc/httpd/mirror/tr
chgrp nobody /usr/local/etc/httpd/mirror/tr
chown nobody /usr/local/etc/httpd/mirror/tr

mkdir /usr/local/etc/httpd/dbm
chgrp nobody /usr/local/etc/httpd/dbm
chown nobody /usr/local/etc/httpd/dbm

echo "" > /usr/local/etc/httpd/logs/cache_log
chgrp nobody /usr/local/etc/httpd/logs/cache_log
chown nobody /usr/local/etc/httpd/logs/cache_log
echo "" > /usr/local/etc/httpd/logs/cache-error_log
chgrp nobody /usr/local/etc/httpd/logs/cache-error_log
chown nobody /usr/local/etc/httpd/logs/cache-error_log
