Here is a very basic but functional install script for freetrade-1.0.4
NO error-checking!!
I hope it comes in handy for someone.....

#!/bin/sh

# freetrade install
# assumes that the archive file is in $servroot

startdir=`pwd`
# edit this
mysql_user="mysqlusername"
mysql_pass="mysqlpassword"
docroot="/my/path/to/htdocs"
servroot="/my/path/to/apache"
sourcefile="freetrade-1.0.4.tar.gz"
docinstalldir="freetrade-test"
servinstalldir="freetrade-test"

# the dir created when the archive is unpacked
sourcedir="$servroot/freetrade-1.0.4"

# shouldn't need to edit the rest

echo "document root         = $docroot"
echo "server root           = $servroot"
echo "source file           = $sourcefile"
echo "document install dir  = $docinstalldir"
echo "server install dir    = $servinstalldir"
echo "source dir            = $sourcedir" 
echo
echo "run initial setup of freetrade, using the above layout?"
echo "Ctrl-C to quit, ENTER to continue..."
read FOO

cd $servroot

# expand the archive
tar zxf $sourcefile

mkdir $docroot/$docinstalldir
mkdir $servroot/$servinstalldir
mkdir $servroot/$servinstalldir/modules

cp -R $sourcedir/htdocs/* $docroot/$docinstalldir
cp -R $sourcedir/modules/* $servroot/$servinstalldir/modules

echo "now you will need to edit global_settings..."
echo "Be sure to set the database settings correctly"
echo "Ctrl-C to quit, ENTER to continue..."
read FOO

vi $servroot/$servinstalldir/modules/include/global_settings

echo "now you will need to edit index.php3..."
echo "Be sure to set paths correctly"
echo "Ctrl-C to quit, ENTER to continue..."
read FOO

vi $docroot/$docinstalldir/index.php3

echo "now you will need to install the database..."
echo "Be sure to set paths correctly"
echo "Ctrl-C to quit, ENTER to continue..."
read FOO

cd $sourcedir

mysql --user=$mysql_user --password=$mysql_pass < build.sql

cd $startdir
echo "done."

bye
Bob Hutchinson
[EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to