Add new LXC: NextPVR

This commit is contained in:
CanbiZ 2024-11-20 13:27:20 +01:00
parent a146ecf22a
commit 9560d0153c
3 changed files with 168 additions and 0 deletions

88
ct/nextpvr.sh Normal file
View File

@ -0,0 +1,88 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 community-scripts ORG
# Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
# Source: https://nextpvr.com/
function header_info {
clear
cat <<"EOF"
_ __ __ ____ _ ______
/ | / /__ _ __/ /_/ __ \ | / / __ \
/ |/ / _ \| |/_/ __/ /_/ / | / / /_/ /
/ /| / __/> </ /_/ ____/| |/ / _, _/
/_/ |_/\___/_/|_|\__/_/ |___/_/ |_|
EOF
}
header_info
echo -e "Loading..."
APP="nextpvr"
var_disk="5"
var_cpu="1"
var_ram="1024"
var_os="debian"
var_version="12"
variables
color
catch_errors
function default_settings() {
CT_TYPE="1"
PW=""
CT_ID=$NEXTID
HN=$NSAPP
DISK_SIZE="$var_disk"
CORE_COUNT="$var_cpu"
RAM_SIZE="$var_ram"
BRG="vmbr0"
NET="dhcp"
GATE=""
APT_CACHER=""
APT_CACHER_IP=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/nextpvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Stopping ${APP}"
systemctl stop nextpvr-server
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP}"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
cd /opt
wget -q https://nextpvr.com/nextpvr-helper.deb
DEBIAN_FRONTEND=noninteractive dpkg -i nextpvr-helper.deb &>/dev/null
msg_info "Starting ${APP}"
systemctl start nextpvr-server
msg_ok "Started ${APP}"
msg_info "Cleaning Up"
rm -rf /opt/nextpvr-helper.deb
msg_ok "Cleaned"
msg_ok "Updated Successfully"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${APP} Setup should be reachable by going to the following URL.
${BL}http://${IP}:8866${CL} \n"

View File

@ -0,0 +1,46 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 communtiy-scripts ORG
# Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
mediainfo \
libmediainfo-dev \
libc6 \
curl \
sudo \
libgdiplus \
acl \
dvb-tools \
libdvbv5-0 \
dtv-scan-tables \
libc6-dev \
ffmpeg \
mc
msg_ok "Installed Dependencies"
msg_info "Setup NextPVR (Patience)"
cd /opt
wget -q https://nextpvr.com/nextpvr-helper.deb
$STD dpkg -i nextpvr-helper.deb
msg_ok "Installed NextPVR"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/nextpvr-helper.deb
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

34
json/nextpvr.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "NextPVR",
"slug": "nextpvr",
"categories": [
0
],
"date_created": "2024-11-20",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8866,
"documentation": "https://github.com/sub3/NextPVR/wiki",
"website": "https://nextpvr.com/",
"logo": null,
"description": "NextPVR is a personal video recorder application for Microsoft Windows, Linux, Mac and Docker. NextPVR makes it easy to watch or record live TV, and provides great features like series recordings, web scheduling, iPhone/iPad client application, Kodi/Emby integration etc.",
"install_methods": [
{
"type": "default",
"script": "/ct/nextpvr.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 5,
"os": "Debian",
"version": 12
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}