mirror of https://github.com/tteck/Proxmox.git
Compare commits
8 Commits
9189e12e48
...
96a40997ca
Author | SHA1 | Date |
---|---|---|
|
96a40997ca | |
|
4f154a2bf1 | |
|
cf20993b86 | |
|
e62958f1c5 | |
|
a1ccf3987e | |
|
40725a0451 | |
|
231f02ca01 | |
|
6501d0f43f |
|
@ -4,6 +4,13 @@
|
|||
|
||||
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||
|
||||
## 2023-07-11
|
||||
|
||||
### Changed
|
||||
|
||||
- **Scrypted LXC**
|
||||
- Add VAAPI hardware transcoding
|
||||
|
||||
## 2023-07-07
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -24,7 +24,7 @@ var_disk="4"
|
|||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_os="debian"
|
||||
var_version="11"
|
||||
var_version="12"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -24,7 +24,7 @@ var_disk="8"
|
|||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_os="debian"
|
||||
var_version="11"
|
||||
var_version="12"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -56,13 +56,13 @@ if [[ ! -d /etc/dns ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
|||
msg_info "Updating ${APP}"
|
||||
|
||||
if ! dpkg -s aspnetcore-runtime-7.0 > /dev/null 2>&1; then
|
||||
wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
dpkg -i packages-microsoft-prod.deb
|
||||
apt-get update
|
||||
apt-get install -y aspnetcore-runtime-7.0
|
||||
wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb
|
||||
dpkg -i packages-microsoft-prod.deb &>/dev/null
|
||||
apt-get update &>/dev/null
|
||||
apt-get install -y aspnetcore-runtime-7.0 &>/dev/null
|
||||
rm packages-microsoft-prod.deb
|
||||
fi
|
||||
$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh)
|
||||
bash <(curl -fsSL https://download.technitium.com/dns/install.sh) &>/dev/null
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@ msg_info "Installing Dependencies (Patience)"
|
|||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y openjdk-11-jdk
|
||||
$STD apt-get install -y ca-certificates-java
|
||||
$STD apt-get install -y openjdk-17-jre-headless
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
|
|
@ -13,7 +13,7 @@ setting_up_container
|
|||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get -y install software-properties-common apt-utils
|
||||
$STD apt-get -y update
|
||||
$STD apt-get -y upgrade
|
||||
|
@ -36,7 +36,19 @@ $STD apt-get -y install \
|
|||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing GStreamer"
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
msg_info "Setting Up Hardware Acceleration"
|
||||
$STD apt-get -y install \
|
||||
va-driver-all \
|
||||
ocl-icd-libopencl1 \
|
||||
intel-opencl-icd
|
||||
|
||||
/bin/chgrp video /dev/dri
|
||||
/bin/chmod 755 /dev/dri
|
||||
/bin/chmod 660 /dev/dri/*
|
||||
msg_ok "Set Up Hardware Acceleration"
|
||||
fi
|
||||
msg_info "Installing GStreamer (Patience)"
|
||||
$STD apt-get -y install \
|
||||
gstreamer1.0-tools \
|
||||
libgstreamer1.0-dev \
|
||||
|
@ -92,7 +104,7 @@ fi
|
|||
|
||||
msg_info "Installing Scrypted"
|
||||
$STD sudo -u root npx -y scrypted@latest install-server
|
||||
msg_info "Installed Scrypted"
|
||||
msg_ok "Installed Scrypted"
|
||||
|
||||
msg_info "Creating Service"
|
||||
service_path="/etc/systemd/system/scrypted.service"
|
||||
|
|
|
@ -517,8 +517,8 @@ build_container() {
|
|||
|
||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||
if [ "$CT_TYPE" == "0" ]; then
|
||||
if [[ "$APP" != "Emby" && "$APP" != "Jellyfin" && "$APP" != "Plex" && "$APP" != "Tdarr" ]]; then
|
||||
cat <<EOF >>$LXC_CONFIG
|
||||
# USB passthrough
|
||||
lxc.cgroup2.devices.allow: a
|
||||
lxc.cap.drop:
|
||||
lxc.cgroup2.devices.allow: c 188:* rwm
|
||||
|
@ -530,13 +530,11 @@ lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=
|
|||
lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CT_TYPE" == "0" ]; then
|
||||
if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Tdarr" ]]; then
|
||||
if [[ "$APP" == "Emby" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" ]]; then
|
||||
cat <<EOF >>$LXC_CONFIG
|
||||
lxc.cgroup2.devices.allow: a
|
||||
lxc.cap.drop:
|
||||
# VAAPI hardware transcoding
|
||||
lxc.cgroup2.devices.allow: c 226:0 rwm
|
||||
lxc.cgroup2.devices.allow: c 226:128 rwm
|
||||
lxc.cgroup2.devices.allow: c 29:0 rwm
|
||||
|
@ -547,7 +545,7 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
# This starts the container and executes <app>-install.sh
|
||||
# This starts the container and executes <app>-install.sh
|
||||
msg_info "Starting LXC Container"
|
||||
pct start "$CTID"
|
||||
msg_ok "Started LXC Container"
|
||||
|
|
|
@ -204,6 +204,8 @@ function default_settings() {
|
|||
MAC=$GEN_MAC
|
||||
LAN_MAC=$GEN_MAC_LAN
|
||||
LAN_BRG="vmbr0"
|
||||
LAN_IP_ADDR="192.168.1.1"
|
||||
LAN_NETMASK="255.255.255.0"
|
||||
LAN_VLAN=",tag=999"
|
||||
MTU=""
|
||||
START_VM="yes"
|
||||
|
@ -217,6 +219,8 @@ function default_settings() {
|
|||
echo -e "${DGN}Using LAN MAC Address: ${BGN}${LAN_MAC}${CL}"
|
||||
echo -e "${DGN}Using LAN Bridge: ${BGN}${LAN_BRG}${CL}"
|
||||
echo -e "${DGN}Using LAN VLAN: ${BGN}999${CL}"
|
||||
echo -e "${DGN}Using LAN IP Address: ${BGN}${LAN_IP_ADDR}${CL}"
|
||||
echo -e "${DGN}Using LAN NETMASK: ${BGN}${LAN_NETMASK}${CL}"
|
||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}"
|
||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||
echo -e "${BL}Creating a OpenWRT VM using the above default settings${CL}"
|
||||
|
@ -287,6 +291,24 @@ function advanced_settings() {
|
|||
exit-script
|
||||
fi
|
||||
|
||||
if LAN_IP_ADDR=$(whiptail --inputbox "Set a router IP" 8 58 $LAN_IP_ADDR --title "LAN IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $LAN_IP_ADDR ]; then
|
||||
LAN_IP_ADDR="192.168.1.1"
|
||||
fi
|
||||
echo -e "${DGN}Using LAN IP ADDRESS: ${BGN}$LAN_IP_ADDR${CL}"
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if LAN_NETMASK=$(whiptail --inputbox "Set a router netmmask" 8 58 $LAN_NETMASK --title "LAN NETMASK" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $LAN_NETMASK ]; then
|
||||
LAN_NETMASK="255.255.255.0"
|
||||
fi
|
||||
echo -e "${DGN}Using LAN NETMASK: ${BGN}$LAN_NETMASK${CL}"
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if MAC1=$(whiptail --inputbox "Set a WAN MAC Address" 8 58 $GEN_MAC --title "WAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $MAC1 ]; then
|
||||
MAC="$GEN_MAC"
|
||||
|
@ -469,8 +491,8 @@ send_line_to_vm "uci delete network.lan"
|
|||
send_line_to_vm "uci set network.lan=interface"
|
||||
send_line_to_vm "uci set network.lan.device=eth0"
|
||||
send_line_to_vm "uci set network.lan.proto=static"
|
||||
send_line_to_vm "uci set network.lan.ipaddr=192.168.2.1"
|
||||
send_line_to_vm "uci set network.lan.netmask=255.255.255.0"
|
||||
send_line_to_vm "uci set network.lan.ipaddr=${LAN_IP_ADDR}"
|
||||
send_line_to_vm "uci set network.lan.netmask=${LAN_NETMASK}"
|
||||
send_line_to_vm "uci set firewall.@zone[1].input='ACCEPT'"
|
||||
send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'"
|
||||
send_line_to_vm "uci commit"
|
||||
|
|
Loading…
Reference in New Issue