-
Notifications
You must be signed in to change notification settings - Fork 2
/
runweb.sh.in
executable file
·40 lines (30 loc) · 1.01 KB
/
runweb.sh.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
ServerRoot=@TOPDIR@
ScriptDir=$ServerRoot/@SCRIPTDIR@
PORT=$($ScriptDir/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/phppgadmin ]; then
mkdir -p $ServerRoot/run/phppgadmin
(cd $ServerRoot/run/phppgadmin;
ln -f -s /usr/share/phppgadmin/* .
rm -f conf
mkdir -p conf
cp $ScriptDir/php/conf/config.inc.php conf )
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 [::]:'$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
#(cd sns_web && script/sns_fastcgi.pl --listen @RUNDIR@/sns.socket )