mirror of
https://github.com/tschettervictor/bsd-apps.git
synced 2025-12-11 01:19:56 +01:00
Update mediamtx-install.sh - fix config file location
This commit is contained in:
@@ -15,7 +15,7 @@ git-lite \
|
||||
go${GO_VERSION}
|
||||
|
||||
# Create Directories
|
||||
mkdir -p /usr/local/www/mediamtx
|
||||
mkdir -p /usr/local/etc/mediamtx
|
||||
mkdir -p /usr/local/etc/rc.d
|
||||
|
||||
# MediaMTX Setup
|
||||
@@ -24,17 +24,17 @@ cd /mediamtx && go122 generate ./...
|
||||
cd /mediamtx && go122 build .
|
||||
cp /mediamtx/mediamtx /usr/local/bin/mediamtx
|
||||
chmod +x /usr/local/bin/mediamtx
|
||||
if ! [ -f "/usr/local/www/mediamtx/mediamtx.yml" ]; then
|
||||
cp /mediamtx/mediamtx.yml /usr/local/www/mediamtx/
|
||||
if [ ! -f "/usr/local/etc/mediamtx/mediamtx.yml" ]; then
|
||||
cp /mediamtx/mediamtx.yml /usr/local/etc/mediamtx/
|
||||
fi
|
||||
rm -R /mediamtx
|
||||
fetch -o /usr/local/etc/rc.d/mediamtx https://raw.githubusercontent.com/tschettervictor/bsd-apps/main/mediamtx/includes/mediamtx
|
||||
chmod +x /usr/local/etc/rc.d/mediamtx
|
||||
pw user add mediamtx -c mediamtx -u 1935 -d /nonexistent -s /usr/bin/nologin
|
||||
chown -R mediamtx:mediamtx /usr/local/www/mediamtx
|
||||
chown -R mediamtx:mediamtx /usr/local/etc/mediamtx
|
||||
|
||||
# Enable and Start Services
|
||||
sysrc mediamtx_config="/usr/local/www/mediamtx/mediamtx.yml"
|
||||
sysrc mediamtx_config="/usr/local/etc/mediamtx/mediamtx.yml"
|
||||
sysrc mediamtx_enable="YES"
|
||||
service mediamtx start
|
||||
|
||||
|
||||
Reference in New Issue
Block a user