I'm porting freeswitch to amazon linux running on an EC2 instance.  And I have installed the following fedora init script to automatically start/stop freeswitch.

https://wiki.freeswitch.org/wiki/Freeswitch_init

However I notice that this script does not work reliably.  Specifically restart does not always do the job.

I looked in and did some experiments.  It appears "freeswitch -stop" does not kill the daemon reliably. It is especially so when freeswitch is just starting.

So I add some code to do the killing more persistently.  I also added "status" command. It is tested on amazon linux.  I'm sure it will work on fedora and centos.  Hopefully it can be of help to others in the similar suite.

Jun