From e8161f757e3dbffced1669be7247539922d8d3be Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 14 Sep 2024 12:14:06 -0600 Subject: [PATCH] Create mediamtx --- mediamtx/includes/mediamtx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 mediamtx/includes/mediamtx diff --git a/mediamtx/includes/mediamtx b/mediamtx/includes/mediamtx new file mode 100644 index 0000000..2589573 --- /dev/null +++ b/mediamtx/includes/mediamtx @@ -0,0 +1,23 @@ +#!/bin/sh + +# Mediamtx FreeBSD Service Script + +# PROVIDE: mediamtx +# REQUIRE: LOGIN +# KEYWORD: shutdown + +. /etc/rc.subr + +name=mediamtx +user=www +rcvar=mediamtx_enable + +: ${mediamtx_enable:="NO"} +: ${mediamtx_config:="/usr/local/www/mediamtx/mediamtx.yml"} + +pidfile=/var/run/${name}.pid +command=/usr/sbin/daemon +command_args="-f -u ${user} -P ${pidfile} /usr/local/bin/${name} ${mediamtx_config}" + +load_rc_config $name +run_rc_command "$1"