diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-08-21 22:41:04 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-08-21 22:41:04 +0000 |
commit | 4e85345b171b5cc2fce6f1f2276c6d1f65ba3d8b (patch) | |
tree | a2822063a21d8890dbb484d35d8c399e947b5593 /net/freeswitch/files/freeswitch.in | |
parent | 34d939427fb1eebfd57f4b9653fde4444aa3040c (diff) | |
download | ports-4e85345b171b5cc2fce6f1f2276c6d1f65ba3d8b.tar.gz ports-4e85345b171b5cc2fce6f1f2276c6d1f65ba3d8b.zip |
Notes
Diffstat (limited to 'net/freeswitch/files/freeswitch.in')
-rw-r--r-- | net/freeswitch/files/freeswitch.in | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/net/freeswitch/files/freeswitch.in b/net/freeswitch/files/freeswitch.in new file mode 100644 index 000000000000..24392472cb06 --- /dev/null +++ b/net/freeswitch/files/freeswitch.in @@ -0,0 +1,50 @@ +#!/bin/sh + +# PROVIDE: freeswitch +# REQUIRE: DAEMON +# KEYWORD: FreeBSD + +. %%RC_SUBR%% + +name=freeswitch +rcvar=`set_rcvar` + +command=%%PREFIX%%/freeswitch/bin/freeswitch +command_args="-nc" + +pidfile=${freeswitch_pidfile:-"%%PREFIX%%/freeswitch/log/freeswitch.pid"} + +freeswitch_enable=${freeswitch_enable-"YES"} + +start_cmd="freeswitch_start" +stop_precmd="freeswitch_stop" +restart_cmd="freeswitch_restart" + +sig_stop=KILL + +load_rc_config $name + +freeswitch_stop () { + echo "Stopping Freeswitch." + %%PREFIX%%/freeswitch/bin/freeswitch -stop + sleep 1 + return 0 +} + +freeswitch_start () { + echo "Starting FreeSwitch." + /usr/sbin/daemon -f /bin/sh -c "$command" + sleep 1 + return +} + +freeswitch_restart () { + echo "ReStarting FreeSwitch." + freeswitch_stop + freeswitch_start + sleep 1 + return +} + +run_rc_command "$1" + |