#!/bin/sh

# *** run as root from HILIS4 root dir ***

chown -R www-data:staff logs
chmod 2770 logs

echo 1 >> sessions/cgisession.id
chown -R www-data:staff sessions
chmod 664 sessions/cgisession.id
chmod 2770 sessions

mkdir -p src/data/tmp_files/bcr_abl
mkdir -p src/data/tmp_files/chimerism
chown -R raj:staff src/data

touch logs/new_msgs.logs
chown www-data:staff logs/new_msgs.logs
chmod 664 logs/new_msgs.logs

touch logs/sql.txt
chown www-data:staff logs/new_msgs.logs
chmod 664 logs/sql.txt

mkdir -p templates/resources/menu/local
touch templates/resources/menu/local/request_forms.leeds
touch templates/resources/menu/local/file_uploads.leeds
chown -R raj:staff templates/resources/menu/local

mkdir -p config/settings/.leeds
chown -R raj:staff config/settings

mkdir /data/files
chown www-data:staff /data/files
ln -s /data/files /usr/local/apps/HILIS4/static/files

touch script/cgi/debug.txt
chown www-data:staff script/cgi/debug.txt
chmod 664 script/cgi/debug.txt