mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Add new LXC: NextPVR (#391)
* Add new LXC: NextPVR * Update ct/nextpvr.sh Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update ct/nextpvr.sh Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Set Updating in CT * Add NextPVR to DVR/NVR Category * Update json/nextpvr.json Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update json/nextpvr.json Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update json/nextpvr.json Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --------- Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										93
									
								
								ct/nextpvr.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								ct/nextpvr.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,93 @@
 | 
			
		||||
#!/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 LXC packages"
 | 
			
		||||
apt-get update &>/dev/null
 | 
			
		||||
apt-get -y upgrade &>/dev/null
 | 
			
		||||
msg_ok "Updated LXC packages"
 | 
			
		||||
 | 
			
		||||
msg_info "Updating ${APP}"
 | 
			
		||||
cd /opt
 | 
			
		||||
wget -q https://nextpvr.com/nextpvr-helper.deb
 | 
			
		||||
dpkg -i nextpvr-helper.deb &>/dev/null
 | 
			
		||||
msg_ok "Updated ${APP}"
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
							
								
								
									
										46
									
								
								install/nextpvr-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								install/nextpvr-install.sh
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										34
									
								
								json/nextpvr.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "NextPVR",
 | 
			
		||||
  "slug": "nextpvr",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    17
 | 
			
		||||
  ],
 | 
			
		||||
  "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": []
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user