<div>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/freeswitch".</div>
<div> </div>
<div>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. </div>
<div> </div>
<div>If I try the start up script:<br></div>
<div>[root@localhost build]# /etc/init.d/freeswitch start<br>Starting freeswitch: [ OK ]</div>
<div>[root@localhost build]# /etc/init.d/freeswitch status<br>freeswitch dead but subsys locked<br></div>
<div>Did I miss somthing here? Please help. Thanks a lot.</div>
<div> </div>
<div>dynaguy</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>Here is the copy of the origenal freeswitch.init.centos5</div>
<div>----------------------------</div>
<div><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/freeswitch.conf<br># pidfile: /usr/local/freeswitch/log/freeswitch.pid<br>#</div>
<div># Source function library.<br>. /etc/init.d/functions</div>
<div>PROG_NAME=freeswitch<br>PID_FILE=${PID_FILE-/usr/local/freeswitch/log/freeswitch.pid}<br>FS_USER=${FS_USER-freeswitch}<br>FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch}<br>FS_HOME=${FS_HOME-/usr/local/freeswitch}<br>
LOCK_FILE=/var/lock/subsys/freeswitch<br>FREESWITCH_ARGS="-nc"<br>RETVAL=0</div>
<div># Source options file<br>if [ -f /etc/sysconfig/freeswitch ]; then<br> . /etc/sysconfig/freeswitch<br>fi</div>
<div># <define any local shell functions used by the code that follows></div>
<div>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>}</div>
<div>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>}</div>
<div>rhstatus() {<br> status $PROG_NAME;<br>}</div>
<div>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|restart}"<br> exit 1<br> ;;<br>
esac<br>exit $RETVAL<br></div>