Files
ProxmoxVE/install/mediamtx-install.sh

47 lines
1017 B
Bash
Raw Permalink Normal View History

2024-03-25 09:48:54 -04:00
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
2024-03-25 09:48:54 -04:00
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bluenviron/mediamtx
2024-03-25 09:48:54 -04:00
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2024-03-25 09:48:54 -04:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y ffmpeg
2024-03-25 09:48:54 -04:00
msg_ok "Installed Dependencies"
2025-08-01 07:25:45 +02:00
fetch_and_deploy_gh_release "mediamtx" "bluenviron/mediamtx" "prebuild" "latest" "/opt/mediamtx" "mediamtx*linux_amd64.tar.gz"
2024-03-25 09:48:54 -04:00
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/mediamtx.service
[Unit]
Description=MediaMTX
After=syslog.target network-online.target
[Service]
ExecStart=/opt/mediamtx/./mediamtx
WorkingDirectory=/opt/mediamtx
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now mediamtx
2024-03-25 09:48:54 -04:00
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
2024-03-25 09:48:54 -04:00
msg_ok "Cleaned"