From 124e16811252914f695edab828b20e2983ec6e18 Mon Sep 17 00:00:00 2001 From: Joshua Ruehlig Date: Tue, 29 Apr 2025 23:33:34 -0700 Subject: [PATCH 1/2] Update rtpproxy.in.freebsd Update rtpproxy.in.freebsd in the upstream source. This will allow the removable of 'files/patch-scripts_rtpproxy.in.freebsd' in the FreeBSD port. --- scripts/rtpproxy.in.freebsd | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/scripts/rtpproxy.in.freebsd b/scripts/rtpproxy.in.freebsd index ebeee905d..76d0b23e2 100755 --- a/scripts/rtpproxy.in.freebsd +++ b/scripts/rtpproxy.in.freebsd @@ -1,28 +1,30 @@ #!/bin/sh -# Add the following lines to /etc/rc.conf to enable RTPproxy: -# -# rtpproxy_enable="YES" - # PROVIDE: rtpproxy # REQUIRE: DAEMON -# BEFORE: ser openser - -prefix=%%PREFIX%% +# BEFORE: kamailio opensips +# +# Add the following lines to /etc/rc.conf to enable RTPProxy: +# +# rtpproxy_enable="YES" +# -. %%RC_SUBR%% +. /etc/rc.subr name=rtpproxy -rcvar=`set_rcvar` - -command="${prefix}/bin/rtpproxy" -pidfile="/var/run/rtpproxy.pid" - +rcvar=rtpproxy_enable load_rc_config ${name} -rtpproxy_enable=${rtpproxy_enable:-"NO"} -rtpproxy_laddr=${rtpproxy_laddr:-"0.0.0.0"} +: ${rtpproxy_enable:="NO"} +: ${rtpproxy_ctrl_socket:="unix:/var/run/rtpproxy.sock"} +: ${rtpproxy_laddr:="0.0.0.0"} +: ${rtpproxy_paddr:="0.0.0.0"} +: ${rtpproxy_usr:="rtpproxy"} +: ${rtpproxy_grp:="rtpproxy"} -command_args="-l ${rtpproxy_laddr} -p /var/run/rtpproxy.pid" +command="%%PREFIX%%/bin/rtpproxy" +pidfile="/var/run/rtpproxy.pid" +command_args="-u ${rtpproxy_usr}:${rtpproxy_grp} -A ${rtpproxy_paddr} -l ${rtpproxy_laddr} \ + -s ${rtpproxy_ctrl_socket} -p ${pidfile}" -run_rc_command "${1}" +run_rc_command "$1" From c8672c976dfc39aeabeabb564f16c9dcd2d86820 Mon Sep 17 00:00:00 2001 From: Joshua Ruehlig Date: Tue, 29 Apr 2025 23:45:49 -0700 Subject: [PATCH 2/2] Update rtpproxy.in.freebsd Add shutdown as recommended by 'Practical rc.d scripting in BSD' --- scripts/rtpproxy.in.freebsd | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/rtpproxy.in.freebsd b/scripts/rtpproxy.in.freebsd index 76d0b23e2..af8686732 100755 --- a/scripts/rtpproxy.in.freebsd +++ b/scripts/rtpproxy.in.freebsd @@ -3,6 +3,7 @@ # PROVIDE: rtpproxy # REQUIRE: DAEMON # BEFORE: kamailio opensips +# KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable RTPProxy: #