<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hello,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I am a newbie to FS and I want learn it. So I setup a Centos 5.2 (fresh
install) and followed the instruction on the wiki installed the new Freeswitch
v1.0.3. After the installation I can start FS by issus command
"/usr/local/freeswitch/bin/<wbr>freeswitch".<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>After that I copied freeswitch.init.centos5 to /etc/init.d/freeswitch
and chmod it to 755. Reboot the server and FS is not running. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>If I try the start up script:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>[root@localhost build]# /etc/init.d/freeswitch start<br>
Starting
freeswitch: <wbr>
[ OK ]<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>[root@localhost build]# /etc/init.d/freeswitch status<br>
freeswitch dead but subsys locked<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Did I miss somthing here? Please help. Thanks a lot.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>dynaguy<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Here is the copy of the origenal freeswitch.init.centos5<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>----------------------------<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
[root@localhost ~]# cat /etc/init.d/freeswitch<br>
#!/bin/bash<br>
#<br>
# /etc/rc.d/init.d/freeswitch<br>
#<br>
# The FreeSwitch Open Source Voice Platform<br>
#<br>
# chkconfig: 345 89 14<br>
# description: Starts and stops the freeswitch server daemon<br>
# processname: freeswitch<br>
# config: /usr/local/freeswitch/conf/<wbr>freeswitch.conf<br>
# pidfile: /usr/local/freeswitch/log/<wbr>freeswitch.pid<br>
#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'># Source function library.<br>
. /etc/init.d/functions<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>PROG_NAME=freeswitch<br>
PID_FILE=${PID_FILE-/usr/<wbr>local/freeswitch/log/<wbr>freeswitch.pid}<br>
FS_USER=${FS_USER-freeswitch}<br>
FS_FILE=${FS_FILE-/usr/local/<wbr>freeswitch/bin/freeswitch}<br>
FS_HOME=${FS_HOME-/usr/local/<wbr>freeswitch}<br>
LOCK_FILE=/var/lock/subsys/<wbr>freeswitch<br>
FREESWITCH_ARGS="-nc"<br>
RETVAL=0<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'># Source options file<br>
if [ -f /etc/sysconfig/freeswitch ]; then<br>
. /etc/sysconfig/freeswitch<br>
fi<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'># <define any local shell functions used by the code that
follows><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>start() {<br>
echo -n "Starting $PROG_NAME:
"<br>
if [ -e $LOCK_FILE ]; then<br>
if [ -e
$PID_FILE ] && [ -e /proc/`cat $PID_FILE` ]; then<br>
echo<br>
echo -n $"$PROG_NAME is already running.";<br>
failure $"$PROG_NAME is already running.";<br>
echo<br>
return 1<br>
fi<br>
fi<br>
cd $FS_HOME<br>
daemon --user $FS_USER --pidfile
$PID_FILE "$FS_FILE $FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null
2>&1"<br>
echo<br>
RETVAL=$?<br>
[ $RETVAL -eq 0 ] && touch
$LOCK_FILE;<br>
echo<br>
return $RETVAL<br>
}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>stop() {<br>
echo -n "Shutting down
$PROG_NAME: "<br>
if [ ! -e $LOCK_FILE ]; then<br>
echo<br>
echo -n
$"cannot stop $PROG_NAME: $PROG_NAME is not running."<br>
failure
$"cannot stop $PROG_NAME: $PROG_NAME is not running."<br>
echo<br>
return 1;<br>
fi<br>
cd $FS_HOME<br>
$FS_FILE -stop > /dev/null
2>&1<br>
killproc $PROG_NAME<br>
RETVAL=$?<br>
echo<br>
[ $RETVAL -eq 0 ] &&
rm -f $LOCK_FILE;<br>
return $RETVAL<br>
}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>rhstatus() {<br>
status $PROG_NAME;<br>
}<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>case "$1" in<br>
start)<br>
start<br>
;;<br>
stop)<br>
stop<br>
;;<br>
status)<br>
status $PROG_NAME<br>
RETVAL=$?<br>
;;<br>
restart)<br>
stop<br>
start<br>
;;<br>
reload)<br>
# <cause the service configuration
to be reread, either with<br>
# kill -HUP or by restarting the
daemons, in a manner similar<br>
# to restart above><br>
;;<br>
condrestart)<br>
[ -f $PID_FILE ] && restart
|| :<br>
;;<br>
*)<br>
echo "Usage: $PROG_NAME
{start|stop|status|reload|<wbr>restart}"<br>
exit 1<br>
;;<br>
esac<br>
exit $RETVAL<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>