38 lines
949 B
Bash
Executable file
38 lines
949 B
Bash
Executable file
#!/bin/sh
|
|
|
|
ServerRoot=@TOPDIR@
|
|
ScriptDir=$ServerRoot/@SCRIPTDIR@
|
|
PORT=$($ServerRoot/etc/portnum.sh)
|
|
WEBSERVER=${WEBSERVER-@WEBSERVER@}
|
|
|
|
if [ ! -x ${WEBSERVER} ]; then
|
|
if [ -x /usr/sbin/httpd2 ]; then
|
|
WEBSERVER=/usr/sbin/httpd2
|
|
else
|
|
echo NO web server found at $WEBSERVER
|
|
exit 10
|
|
fi
|
|
fi
|
|
|
|
if [ -d /usr/share/phpmyadmin ]; then
|
|
mkdir -p $ServerRoot/run/phpmyadmin
|
|
(cd $ServerRoot/run/phpmyadmin;
|
|
ln -f -s /usr/share/phpmyadmin/* .
|
|
rm -f config.inc.php
|
|
cp $ScriptDir/config.inc.php . )
|
|
fi
|
|
|
|
mkdir -p $ServerRoot/run/lock/apache2
|
|
mkdir -p $ServerRoot/run/log/apache2
|
|
|
|
echo Starting web server on port $PORT
|
|
$WEBSERVER -f ${ScriptDir}/apache2.conf -d $ServerRoot -C 'User '$USER -C 'Listen 127.0.0.1:'$PORT
|
|
|
|
# for applications which use Rails too.
|
|
#echo Now starting mongrel cluster on port 9000/9001.
|
|
#echo NOTE: started in DEVELOPMENT mode.
|
|
|
|
#$ServerRoot/script/process/spawner mongrel -p 9000 -i 2 -a 127.0.0.1
|
|
|
|
|