Project

General

Profile

Feature #14196 ยป 0000143-create_typo3_basis.sh

Administrator Admin, 2004-06-07 06:35

 
#!/bin/sh

# Create a home directory for a Typo3 setup using a common source tree
#
# @author Michael Cannon, michael@cannonbose.com
# @version $Id:$

# variable constants
HTACCESS='.htaccess'
TYPO3_SRC='/home2/cannon/third_party/TYPO3core'
WEB_GROUP='nobody'

# Typo3 source
ln -s ${TYPO3_SRC} typo3_src

# typo3 source links
ln -s typo3_src/typo3
ln -s typo3_src/t3lib
ln -s typo3_src/tslib

# root page links
ln -s tslib/index_ts.php index.php
ln -s tslib/showpic.php

# create hard directories
# tempory files
mkdir typo3temp
mkdir -p fileadmin/_temp_/

# extension
mkdir -p typo3conf/ext/

# user files
mkdir fileadmin/static/

# extension and user uploads
mkdir -p fileadmin/uploads/pics/
mkdir fileadmin/uploads/media/
mkdir fileadmin/uploads/tf/

# log files
mkdir fileadmin/logs/

# static publication
mkdir publish

# create a starting localconf.php
# basic defaults are made sans database login information
cp ${TYPO3_SRC}/localconf.php typo3conf/.

# modify .htaccess
echo "RewriteEngine On" >> ${HTACCESS}
echo "RewriteCond %{REQUEST_FILENAME} !-f" >> ${HTACCESS}
echo "RewriteRule ^typo3$ typo3/index_re.php" >> ${HTACCESS}
echo "RewriteRule ^[^/]*\.html$ index.php" >> ${HTACCESS}
echo "ErrorDocument 404 /" >> ${HTACCESS}

# check group
sudo chgrp -R ${WEB_GROUP} fileadmin publish typo3conf typo3temp

# check write permissions
chmod -R g+w fileadmin publish typo3conf typo3temp

# make uploads accessible from fileadmin
ln -s fileadmin/uploads

# now just point to the frontend at http://example.com/ for Install 1-2-3
# to customize database and other configuration information
    (1-1/1)