Compare commits

...

8 Commits

Author SHA1 Message Date
tteckster 96a40997ca
Update keycloak.sh
default Debian 12
2023-07-15 01:11:37 -04:00
tteckster 4f154a2bf1
Update keycloak-install.sh
openjdk 17
closes https://github.com/tteck/Proxmox/issues/1618
2023-07-15 01:11:03 -04:00
tteckster cf20993b86
Update technitiumdns.sh
fix unbound variable 
fixes https://github.com/tteck/Proxmox/issues/1608
2023-07-12 13:28:53 -04:00
tteckster e62958f1c5
Update CHANGELOG.md 2023-07-11 17:48:21 -04:00
tteckster a1ccf3987e
Update scrypted.sh
default Debian 12
2023-07-11 17:42:12 -04:00
tteckster 40725a0451
Update scrypted-install.sh
VAAPI hardware transcoding + USB passthrough
2023-07-11 17:41:23 -04:00
tteckster 231f02ca01
Update build.func
Code refactoring
2023-07-11 17:38:19 -04:00
Victor Caldas 6501d0f43f
Make IP and NETMASK configurable (#1605)
* Make IP and NETMASK configurable

Users can now customize IP and Netmask of the router
2023-07-11 06:16:46 -04:00
8 changed files with 63 additions and 23 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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) }')

View File

@ -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"

View File

@ -1,7 +1,7 @@
variables() {
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern.
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern.
}
# This function sets various color variables using ANSI escape codes for formatting text in the terminal.
@ -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
cat <<EOF >>$LXC_CONFIG
# USB passthrough
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 188:* rwm
@ -529,14 +529,12 @@ lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file
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"

View File

@ -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"