#!/bin/bash GROUP="apache" # # Create user file # if test -f data/users.xml then echo "data/users.xml already exists." else echo "Creating data/users.xml" echo "<?xml version='1.0' encoding='UTF-8'?>" > data/users.xml echo "<users>" >> data/users.xml echo " <user userid='admin' password='8456c0209aaa9ca04730a3160caf6e5e6b5ea389'/>" >> data/users.xml echo "</users>" >> data/users.xml chgrp $GROUP data/users.xml chmod g+wr data/users.xml fi # # Create config files # if test -f htdocs/config.php then echo "htdocs/config.php already exists" else echo "Creating htdocs/config.php" cp htdocs/config.php.defaults htdocs/config.php fi if test -f forum/htdocs/config.php then echo "forum/htdocs/config.php already exists" else echo "Creating forum/htdocs/config.php" cp forum/htdocs/config.php.defaults forum/htdocs/config.php fi # # Create symlink to forum # if test -L htdocs/forum then echo "htdocs/forum symlink already exists" else echo "Creating htdocs/forum symlink" (cd htdocs; ln ../forum/htdocs forum -s) fi